summaryrefslogtreecommitdiff
path: root/tests/build.lua
diff options
context:
space:
mode:
authorTitanSnow <[email protected]>2017-05-25 08:07:12 +0800
committerTitanSnow <[email protected]>2017-05-25 08:12:46 +0800
commitb91fc2f5a31c9a7aefbc5585a60b14d6cfa614fa (patch)
treee4b206979a8e86f35e4c05b213acde2db949cf4e /tests/build.lua
parent4fafe79dd79efe67c3ed92362152a8aa883788c7 (diff)
parentea123cda41560f549861eca8222a4153cb72bbd6 (diff)
Merge branch 'dev' into installtest
Diffstat (limited to 'tests/build.lua')
-rw-r--r--tests/build.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/build.lua b/tests/build.lua
index 6a2ccb339..667b29e99 100644
--- a/tests/build.lua
+++ b/tests/build.lua
@@ -1,3 +1,6 @@
+-- imports
+import("privilege.sudo")
+
-- main entry
function main(argv)
@@ -14,7 +17,6 @@ function main(argv)
os.exec("xmake f -m release")
os.exec("xmake -r -a -v --backtrace")
os.exec("xmake f --mode=debug --verbose --backtrace")
- os.exec("xmake --rebuild --all --verbose --backtrace")
os.exec("xmake p --verbose --backtrace")
os.exec("xmake c --verbose --backtrace")
os.exec("xmake m -e buildtest")
@@ -22,14 +24,14 @@ function main(argv)
os.exec("xmake f --cc=gcc --cxx=g++")
os.exec("xmake m buildtest")
if os.host() ~= "windows" then
- os.exec("sudo xmake install")
- os.exec("sudo xmake uninstall")
+ sudo.exec("xmake install")
+ sudo.exec("xmake uninstall")
end
os.exec("xmake f --cc=clang --cxx=clang++ --ld=clang++ --verbose --backtrace")
os.exec("xmake m buildtest")
if os.host() ~= "windows" then
- os.exec("sudo xmake install --all -v --backtrace")
- os.exec("sudo xmake uninstall -v --backtrace")
+ sudo.exec("xmake install --all -v --backtrace")
+ sudo.exec("xmake uninstall -v --backtrace")
end
os.exec("xmake m -d buildtest")