diff options
| author | OpportunityLiu <[email protected]> | 2019-06-06 19:18:49 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-06-06 19:18:49 +0800 |
| commit | d67139ef9cb3743e3146dd965586b3110e64b002 (patch) | |
| tree | bba60931860bce0e501790f0f449885b8a2ddb88 | |
| parent | f564e7dbd980ece14d7e2e15f4499d8c1b7db858 (diff) | |
add test
| -rw-r--r-- | .appveyor.yml | 13 | ||||
| -rw-r--r-- | xmake/actions/update/main.lua | 2 |
2 files changed, 9 insertions, 6 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index fdcf4db94..63cf3831b 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -17,20 +17,23 @@ build_script: Get-Command xmake xmake --version xmake build --project=core - .\core\build\xmake.exe --version Set-AppveyorBuildVariable -Name XMAKE_PROGRAM_DIR -Value $(Join-Path $(Get-Location) "xmake") - Copy-Item -Force core\build\xmake.exe $HOME\xmake + .\core\build\xmake.exe --version + Copy-Item -Force core\build\xmake.exe $(Get-Command xmake).Source after_build: - ps: | Copy-Item .\core\build\xmake.exe .\xmake Copy-Item .\*.md .\xmake - Compress-Archive -Path .\xmake -DestinationPath .\archive.zip + Compress-Archive -Path .\xmake -DestinationPath .\archive.zip -CompressionLevel Optimal Push-AppveyorArtifact .\archive.zip -FileName xmake.zip -DeploymentName "xmake-$($env:PLATFORM)" test_script: - ps: | - Get-Command xmake xmake --version - xmake lua --verbose --diagnosis tests\test.lua + Add-AppveyorTest -Name "tests" -Framework "xmake-test" -FileName ./tests/test.lua -Outcome Running + $time = Measure-Command { + $stdout = Invoke-Expression "xmake lua --verbose --diagnosis tests\test.lua" -ErrorVariable stderr + } + Update-AppveyorTest -Name "tests" -Framework "xmake-test" -FileName ./tests/test.lua -Outcome Passed -Duration $time.Milliseconds -StdOut $stdout -StdErr $stderr diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua index 1b25bd6bc..cab44adf3 100644 --- a/xmake/actions/update/main.lua +++ b/xmake/actions/update/main.lua @@ -301,7 +301,7 @@ function main() -- the download task local sourcedir = path.join(os.tmpdir(), "xmakesrc", version) - vprint("prepared to downlaod to temp dir %s ..", sourcedir) + vprint("prepared to download to temp dir %s ..", sourcedir) local download_task = function () for idx, url in ipairs(mainurls) do |
