Rearrange the tests into sets; allow plats to skip sets; pc86 and linux68k now
authorDavid Given <dg@cowlark.com>
Fri, 8 Jun 2018 06:59:04 +0000 (15:59 +0900)
committerDavid Given <dg@cowlark.com>
Fri, 8 Jun 2018 06:59:04 +0000 (15:59 +0900)
skip the tests which use floating point instructions (as their emulators don't
support them).

29 files changed:
plat/linux68k/tests/build.lua
plat/pc86/tests/build.lua
tests/plat/build.lua
tests/plat/core/_dummy_e.c [moved from tests/plat/_dummy_e.c with 100% similarity]
tests/plat/core/brk_c.c [moved from tests/plat/brk_c.c with 100% similarity]
tests/plat/core/bss_e.c [moved from tests/plat/bss_e.c with 100% similarity]
tests/plat/core/calloc_c.c [moved from tests/plat/calloc_c.c with 100% similarity]
tests/plat/core/csa_e.c [moved from tests/plat/csa_e.c with 100% similarity]
tests/plat/core/csb_e.c [moved from tests/plat/csb_e.c with 100% similarity]
tests/plat/core/dup_e.e [moved from tests/plat/dup_e.e with 100% similarity]
tests/plat/core/exg_e.e [moved from tests/plat/exg_e.e with 100% similarity]
tests/plat/core/inn_e.e [moved from tests/plat/inn_e.e with 100% similarity]
tests/plat/core/intadd_e.c [moved from tests/plat/intadd_e.c with 100% similarity]
tests/plat/core/intcmp_e.c [moved from tests/plat/intcmp_e.c with 100% similarity]
tests/plat/core/intdiv_e.c [moved from tests/plat/intdiv_e.c with 100% similarity]
tests/plat/core/intrem_e.c [moved from tests/plat/intrem_e.c with 100% similarity]
tests/plat/core/intshift_e.c [moved from tests/plat/intshift_e.c with 100% similarity]
tests/plat/core/intsub_e.c [moved from tests/plat/intsub_e.c with 100% similarity]
tests/plat/core/newdispose_p.p [moved from tests/plat/newdispose_p.p with 100% similarity]
tests/plat/core/pascalsets_p.p [moved from tests/plat/pascalsets_p.p with 100% similarity]
tests/plat/core/rck_e.e [moved from tests/plat/rck_e.e with 100% similarity]
tests/plat/core/rotate_e.e [moved from tests/plat/rotate_e.e with 100% similarity]
tests/plat/core/setjmp_c.c [moved from tests/plat/setjmp_c.c with 100% similarity]
tests/plat/core/structcopy_e.c [moved from tests/plat/structcopy_e.c with 100% similarity]
tests/plat/floats/doublecmp_e.c [moved from tests/plat/doublecmp_e.c with 100% similarity]
tests/plat/floats/from_d_to_si_e.c [moved from tests/plat/from_d_to_si_e.c with 100% similarity]
tests/plat/floats/from_d_to_ui_e.c [moved from tests/plat/from_d_to_ui_e.c with 100% similarity]
tests/plat/floats/from_si_to_d_e.c [moved from tests/plat/from_si_to_d_e.c with 100% similarity]
tests/plat/floats/from_ui_to_d_e.c [moved from tests/plat/from_ui_to_d_e.c with 100% similarity]

index dd6d0fc..6a4b847 100644 (file)
@@ -4,4 +4,5 @@ plat_testsuite {
     name = "tests",
     plat = "linux68k",
     method = "plat/linux68k/emu+emu68k",
+       skipsets = {"floats"}, -- FPU instructions not supported by emulator
 }
index 4550c81..84b70a1 100644 (file)
@@ -4,4 +4,5 @@ plat_testsuite {
     name = "tests",
     plat = "pc86",
     method = "plat/pc86/emu+pc86emu",
+       skipsets = {"floats"}, -- FPU instructions not supported by emulator
 }
index 813a298..c35bd2d 100644 (file)
@@ -4,20 +4,25 @@ definerule("plat_testsuite",
        {
                plat = { type="string" },
                method = { type="string" },
+               sets = { type="table", default={"core", "b", "bugs", "m2", "floats"}},
+               skipsets = { type="table", default={}},
        },
        function(e)
                -- Remember this is executed from the caller's directory; local
                -- target names will resolve there.
-               local testfiles = filenamesof(
-                       -- added structcopy_e.c
-                       "tests/plat/*.c",
-                       "tests/plat/*.e",
-                       "tests/plat/*.p",
-                       "tests/plat/b/*.b",
-                       "tests/plat/bugs/*.c",
-                       "tests/plat/bugs/*.mod",
-                       "tests/plat/m2/*.mod"
-               )
+               local testfiles = {}
+               local skipsets = {}
+               for _, set in ipairs(e.skipsets) do
+                       skipsets[set] = true
+               end
+               for _, set in ipairs(e.sets) do
+                       if not skipsets[set] then
+                               local fs = filenamesof("tests/plat/"..set.."/*")
+                               for _, f in ipairs(fs) do
+                                       testfiles[#testfiles+1] = f
+                               end
+                       end
+               end
 
                acklibrary {
                        name = "lib",
similarity index 100%
rename from tests/plat/brk_c.c
rename to tests/plat/core/brk_c.c
similarity index 100%
rename from tests/plat/bss_e.c
rename to tests/plat/core/bss_e.c
similarity index 100%
rename from tests/plat/csa_e.c
rename to tests/plat/core/csa_e.c
similarity index 100%
rename from tests/plat/csb_e.c
rename to tests/plat/core/csb_e.c
similarity index 100%
rename from tests/plat/dup_e.e
rename to tests/plat/core/dup_e.e
similarity index 100%
rename from tests/plat/exg_e.e
rename to tests/plat/core/exg_e.e
similarity index 100%
rename from tests/plat/inn_e.e
rename to tests/plat/core/inn_e.e
similarity index 100%
rename from tests/plat/rck_e.e
rename to tests/plat/core/rck_e.e