From 99fef1222a2e7905ce4ad396c848ffaf0a991849 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 17 Dec 2020 00:05:59 +0800 Subject: move tests --- tests/apis/toolchain_multivs/.gitignore | 8 -------- tests/apis/toolchain_multivs/src/main.cpp | 9 --------- tests/apis/toolchain_multivs/src/test.asm | 1 - tests/apis/toolchain_multivs/src/test.rc | 0 tests/apis/toolchain_multivs/test.lua | 7 ------- tests/apis/toolchain_multivs/xmake.lua | 18 ------------------ tests/projects/other/multiplats/src/main.c | 7 ------- tests/projects/other/multiplats/test.lua | 8 -------- tests/projects/other/multiplats/xmake.lua | 15 --------------- tests/projects/other/multiplats_vs/.gitignore | 8 ++++++++ tests/projects/other/multiplats_vs/src/main.cpp | 9 +++++++++ tests/projects/other/multiplats_vs/src/test.asm | 1 + tests/projects/other/multiplats_vs/src/test.rc | 0 tests/projects/other/multiplats_vs/test.lua | 7 +++++++ tests/projects/other/multiplats_vs/xmake.lua | 18 ++++++++++++++++++ tests/projects/other/multiplats_xcode/src/main.c | 7 +++++++ tests/projects/other/multiplats_xcode/test.lua | 8 ++++++++ tests/projects/other/multiplats_xcode/xmake.lua | 15 +++++++++++++++ 18 files changed, 73 insertions(+), 73 deletions(-) delete mode 100644 tests/apis/toolchain_multivs/.gitignore delete mode 100644 tests/apis/toolchain_multivs/src/main.cpp delete mode 100644 tests/apis/toolchain_multivs/src/test.asm delete mode 100644 tests/apis/toolchain_multivs/src/test.rc delete mode 100644 tests/apis/toolchain_multivs/test.lua delete mode 100644 tests/apis/toolchain_multivs/xmake.lua delete mode 100644 tests/projects/other/multiplats/src/main.c delete mode 100644 tests/projects/other/multiplats/test.lua delete mode 100644 tests/projects/other/multiplats/xmake.lua create mode 100644 tests/projects/other/multiplats_vs/.gitignore create mode 100644 tests/projects/other/multiplats_vs/src/main.cpp create mode 100644 tests/projects/other/multiplats_vs/src/test.asm create mode 100644 tests/projects/other/multiplats_vs/src/test.rc create mode 100644 tests/projects/other/multiplats_vs/test.lua create mode 100644 tests/projects/other/multiplats_vs/xmake.lua create mode 100644 tests/projects/other/multiplats_xcode/src/main.c create mode 100644 tests/projects/other/multiplats_xcode/test.lua create mode 100644 tests/projects/other/multiplats_xcode/xmake.lua diff --git a/tests/apis/toolchain_multivs/.gitignore b/tests/apis/toolchain_multivs/.gitignore deleted file mode 100644 index 152105761..000000000 --- a/tests/apis/toolchain_multivs/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Xmake cache -.xmake/ -build/ - -# MacOS Cache -.DS_Store - - diff --git a/tests/apis/toolchain_multivs/src/main.cpp b/tests/apis/toolchain_multivs/src/main.cpp deleted file mode 100644 index 7c435d251..000000000 --- a/tests/apis/toolchain_multivs/src/main.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include - -using namespace std; - -int main(int argc, char** argv) -{ - cout << "hello world!" << endl; - return 0; -} diff --git a/tests/apis/toolchain_multivs/src/test.asm b/tests/apis/toolchain_multivs/src/test.asm deleted file mode 100644 index 8b1378917..000000000 --- a/tests/apis/toolchain_multivs/src/test.asm +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tests/apis/toolchain_multivs/src/test.rc b/tests/apis/toolchain_multivs/src/test.rc deleted file mode 100644 index e69de29bb..000000000 diff --git a/tests/apis/toolchain_multivs/test.lua b/tests/apis/toolchain_multivs/test.lua deleted file mode 100644 index 795df5c95..000000000 --- a/tests/apis/toolchain_multivs/test.lua +++ /dev/null @@ -1,7 +0,0 @@ -function test_multivs(t) - if is_subhost("windows") then - t:build() - else - return t:skip("wrong host platform") - end -end diff --git a/tests/apis/toolchain_multivs/xmake.lua b/tests/apis/toolchain_multivs/xmake.lua deleted file mode 100644 index 4e61a20a1..000000000 --- a/tests/apis/toolchain_multivs/xmake.lua +++ /dev/null @@ -1,18 +0,0 @@ -add_rules("mode.debug", "mode.release") - -rule("vs2015_x86") - before_load(function (target) - target:set("arch", "x86") - target:set("toolchains", "msvc", {vs = "2015"}) - end) - -target("testvs_vs2015_x86") - set_kind("binary") - add_files("src/*.cpp", "src/*.rc") - add_rules("vs2015_x86") - -target("testvs") - set_kind("binary") - add_files("src/*.cpp", "src/*.rc") - - diff --git a/tests/projects/other/multiplats/src/main.c b/tests/projects/other/multiplats/src/main.c deleted file mode 100644 index 9ae580511..000000000 --- a/tests/projects/other/multiplats/src/main.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -int main(int argc, char** argv) -{ - printf("hello world!\n"); - return 0; -} diff --git a/tests/projects/other/multiplats/test.lua b/tests/projects/other/multiplats/test.lua deleted file mode 100644 index 196797077..000000000 --- a/tests/projects/other/multiplats/test.lua +++ /dev/null @@ -1,8 +0,0 @@ -function main(t) - if is_host("macosx") then - os.exec("xmake f -c -vD") - os.exec("xmake -rvD") - os.exec("xmake f -c -vD -p iphoneos") - os.exec("xmake -rvD") - end -end diff --git a/tests/projects/other/multiplats/xmake.lua b/tests/projects/other/multiplats/xmake.lua deleted file mode 100644 index e8fbbb372..000000000 --- a/tests/projects/other/multiplats/xmake.lua +++ /dev/null @@ -1,15 +0,0 @@ -add_rules("mode.debug", "mode.release") -target("test_host") - set_kind("binary") - add_files("src/*.c") - -target("test_iphoneos") - set_kind("binary") - add_files("src/*.c") - set_plat("iphoneos") - -target("test_iphoneos_armv7") - set_kind("binary") - add_files("src/*.c") - set_plat("iphoneos") - set_arch("armv7") diff --git a/tests/projects/other/multiplats_vs/.gitignore b/tests/projects/other/multiplats_vs/.gitignore new file mode 100644 index 000000000..152105761 --- /dev/null +++ b/tests/projects/other/multiplats_vs/.gitignore @@ -0,0 +1,8 @@ +# Xmake cache +.xmake/ +build/ + +# MacOS Cache +.DS_Store + + diff --git a/tests/projects/other/multiplats_vs/src/main.cpp b/tests/projects/other/multiplats_vs/src/main.cpp new file mode 100644 index 000000000..7c435d251 --- /dev/null +++ b/tests/projects/other/multiplats_vs/src/main.cpp @@ -0,0 +1,9 @@ +#include + +using namespace std; + +int main(int argc, char** argv) +{ + cout << "hello world!" << endl; + return 0; +} diff --git a/tests/projects/other/multiplats_vs/src/test.asm b/tests/projects/other/multiplats_vs/src/test.asm new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/tests/projects/other/multiplats_vs/src/test.asm @@ -0,0 +1 @@ + diff --git a/tests/projects/other/multiplats_vs/src/test.rc b/tests/projects/other/multiplats_vs/src/test.rc new file mode 100644 index 000000000..e69de29bb diff --git a/tests/projects/other/multiplats_vs/test.lua b/tests/projects/other/multiplats_vs/test.lua new file mode 100644 index 000000000..795df5c95 --- /dev/null +++ b/tests/projects/other/multiplats_vs/test.lua @@ -0,0 +1,7 @@ +function test_multivs(t) + if is_subhost("windows") then + t:build() + else + return t:skip("wrong host platform") + end +end diff --git a/tests/projects/other/multiplats_vs/xmake.lua b/tests/projects/other/multiplats_vs/xmake.lua new file mode 100644 index 000000000..4e61a20a1 --- /dev/null +++ b/tests/projects/other/multiplats_vs/xmake.lua @@ -0,0 +1,18 @@ +add_rules("mode.debug", "mode.release") + +rule("vs2015_x86") + before_load(function (target) + target:set("arch", "x86") + target:set("toolchains", "msvc", {vs = "2015"}) + end) + +target("testvs_vs2015_x86") + set_kind("binary") + add_files("src/*.cpp", "src/*.rc") + add_rules("vs2015_x86") + +target("testvs") + set_kind("binary") + add_files("src/*.cpp", "src/*.rc") + + diff --git a/tests/projects/other/multiplats_xcode/src/main.c b/tests/projects/other/multiplats_xcode/src/main.c new file mode 100644 index 000000000..9ae580511 --- /dev/null +++ b/tests/projects/other/multiplats_xcode/src/main.c @@ -0,0 +1,7 @@ +#include + +int main(int argc, char** argv) +{ + printf("hello world!\n"); + return 0; +} diff --git a/tests/projects/other/multiplats_xcode/test.lua b/tests/projects/other/multiplats_xcode/test.lua new file mode 100644 index 000000000..196797077 --- /dev/null +++ b/tests/projects/other/multiplats_xcode/test.lua @@ -0,0 +1,8 @@ +function main(t) + if is_host("macosx") then + os.exec("xmake f -c -vD") + os.exec("xmake -rvD") + os.exec("xmake f -c -vD -p iphoneos") + os.exec("xmake -rvD") + end +end diff --git a/tests/projects/other/multiplats_xcode/xmake.lua b/tests/projects/other/multiplats_xcode/xmake.lua new file mode 100644 index 000000000..e8fbbb372 --- /dev/null +++ b/tests/projects/other/multiplats_xcode/xmake.lua @@ -0,0 +1,15 @@ +add_rules("mode.debug", "mode.release") +target("test_host") + set_kind("binary") + add_files("src/*.c") + +target("test_iphoneos") + set_kind("binary") + add_files("src/*.c") + set_plat("iphoneos") + +target("test_iphoneos_armv7") + set_kind("binary") + add_files("src/*.c") + set_plat("iphoneos") + set_arch("armv7") -- cgit v1.3.1