Commit aa51a9791a972cf177d11b7752a378de41912864

Cameron Cawley 2022-05-19T13:14:29

Run tests with OpenWatcom on CI

diff --git a/.github/workflows/watcom.yml b/.github/workflows/watcom.yml
index 4650246..ead7c47 100644
--- a/.github/workflows/watcom.yml
+++ b/.github/workflows/watcom.yml
@@ -23,6 +23,11 @@ jobs:
         run: |
           cd test && wmake -f ${{ matrix.platform.makefile }}
           cd ..
+      - name: Run tests
+        if: "matrix.platform.makefile == 'Makefile.w32'"
+        run: |
+          cd test && wmake -f ${{ matrix.platform.makefile }} check-quick
+          cd ..
       - name: distclean
         run: |
           wmake -f ${{ matrix.platform.makefile }} distclean
diff --git a/test/watcom.mif b/test/watcom.mif
index 4cc8e7e..dbeec5d 100644
--- a/test/watcom.mif
+++ b/test/watcom.mif
@@ -25,6 +25,29 @@ TARGETS = testatomic.exe testdisplayinfo.exe testbounds.exe testdraw2.exe &
           testautomation.exe testaudiohotplug.exe testcustomcursor.exe testmultiaudio.exe &
           testoffscreen.exe testurl.exe
 
+noninteractive = &
+	testatomic.exe &
+	testerror.exe &
+	testfilesystem.exe &
+	testkeys.exe &
+	testlocale.exe &
+	testplatform.exe &
+	testpower.exe &
+	testqsort.exe &
+	testthread.exe &
+	testtimer.exe &
+	testver.exe
+
+needs_audio = &
+	testaudioinfo.exe &
+	testsurround.exe
+
+needs_display = &
+	testbounds.exe &
+	testdisplayinfo.exe
+
+TESTS = $(noninteractive) $(needs_audio) $(needs_display)
+
 # testautomation sources
 TASRCS = testautomation.c testautomation_audio.c testautomation_clipboard.c &
          testautomation_events.c testautomation_hints.c &
@@ -73,6 +96,19 @@ testime.exe: testime.obj
 testutils.lib: testutils.obj
   wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $<
 
+check: .SYMBOLIC $(TESTS)
+  @set SDL_AUDIODRIVER=dummy
+  @set SDL_VIDEODRIVER=dummy
+  @copy "../SDL2.dll" .
+  @for %exe in ($(TESTS)) do %exe
+
+check-quick: .SYMBOLIC $(TESTS)
+  @set SDL_TESTS_QUICK=1
+  @set SDL_AUDIODRIVER=dummy
+  @set SDL_VIDEODRIVER=dummy
+  @copy "../SDL2.dll" .
+  @for %exe in ($(TESTS)) do %exe
+
 clean: .SYMBOLIC
   rm -f *.obj *.err
 distclean: .SYMBOLIC clean