summaryrefslogtreecommitdiffstats
path: root/src/openmp-validation-1-fixes.patch
blob: 84f710c8acf1fa870ef0d9451ec996daaf38d0f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
This file is part of MXE. See LICENSE.md for licensing information.

Contains ad hoc patches for cross building.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Sun, 23 Feb 2014 05:22:26 +1100
Subject: [PATCH] Overwrite built-in rules to allow .exe suffix


diff --git a/Makefile b/Makefile
index 1111111..2222222 100644
--- a/Makefile
+++ b/Makefile
@@ -185,14 +185,21 @@ omp_testsuite.h: ompts-c.conf c/*
 .c.o: omp_testsuite omp_my_sleep
 	$(CC) $(CFLAGS) -c $<
 
+# Overwrite built-in rules to allow .exe suffix
+%: %.c
+	$(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@$(EXE_SUFFIX)
+
+%: %.f
+	$(LINK.f) $^ $(LOADLIBES) $(LDLIBS) -o $@$(EXE_SUFFIX)
+
 ctest: omp_my_sleep omp_testsuite
-	./runtest.pl --lang=c testlist-c.txt
+	./runtest.pl $(RUNTEST_OPTIONS) --lang=c testlist-c.txt
 
 ftest:
 	mkdir -p bin/fortran
 	cp omp_testsuite.f bin/fortran
 	cp omp_my_sleep.f bin/fortran
-	./runtest.pl --lang=fortran testlist-f.txt
+	./runtest.pl $(RUNTEST_OPTIONS) --lang=fortran testlist-f.txt
 
 print_compile_options:
 	@echo "-------------------"
diff --git a/omp_my_sleep.h b/omp_my_sleep.h
index 1111111..2222222 100644
--- a/omp_my_sleep.h
+++ b/omp_my_sleep.h
@@ -5,7 +5,6 @@
 #include<stdlib.h>
 #include<unistd.h>
 
-#include <sys/times.h> 
 #include <sys/time.h>
 #include <time.h>
 #include <errno.h>

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Sun, 23 Feb 2014 05:22:26 +1100
Subject: [PATCH] add Batchfile with test to run on host


diff --git a/all-tests-openmp-validation.bat b/all-tests-openmp-validation.bat
new file mode 100644
index 1111111..2222222
--- /dev/null
+++ b/all-tests-openmp-validation.bat
@@ -0,0 +1,40 @@
+setlocal enableextensions enabledelayedexpansion
+set /a TEST_COUNT=0
+set /a FAIL_COUNT=0
+set /a PASS_COUNT=0
+set LOG_FILE=%~n0.log
+set BLANK=
+for /l %%I in (1,1,79) do set SPACER=%BLANK% %BLANK%!SPACER!
+date /t >  %LOG_FILE%
+time /t >> %LOG_FILE%
+echo. >> %LOG_FILE%
+echo L=Language (c=c, n=fortran) >> %LOG_FILE%
+echo Pass 0=Y >> %LOG_FILE%
+echo. >> %LOG_FILE%
+echo L Test Name %SPACER:~0,50% Pass  Certainty%%>> %LOG_FILE%
+echo %SPACER: =-%>> %LOG_FILE%
+for /r %%F in (test*.exe) do (
+	set /a TEST_COUNT += 1
+	%%F
+	set ERR=!errorlevel!
+	if !ERR! neq 0 (set /a FAIL_COUNT += 1) else set /a PASS_COUNT += 1
+	set TEST_LANG=%%~pF
+	set TEST_NAME=%%~nF%SPACER%
+	set ERR_SPC=!ERR!%SPACER%
+	set /p "=!TEST_LANG:~-2,-1! !TEST_NAME:~0,60! !ERR_SPC:~0,5! " < nul >> %LOG_FILE%
+	%%~dpFc%%~nxF
+	echo !errorlevel!%% >> %LOG_FILE%
+	if exist %%~dpForph_%%~nxF (
+		set /a TEST_COUNT += 1
+		%%~dpForph_%%~nxF
+		set ERR=!errorlevel!
+		if !ERR! neq 0 (set /a FAIL_COUNT += 1) else set /a PASS_COUNT += 1
+		set TEST_NAME=orph_%%~nF%SPACER%
+		set ERR_SPC=!ERR!%SPACER%
+		set /p "=!TEST_LANG:~-2,-1! !TEST_NAME:~0,60! !ERR_SPC:~0,5! " < nul >> %LOG_FILE%
+		%%~dpForph_c%%~nxF
+		echo !errorlevel!%% >> %LOG_FILE%
+	)
+)
+echo. >> %LOG_FILE%
+echo Total tests: !TEST_COUNT!  Total Failed: !FAIL_COUNT! Total Passed: !PASS_COUNT!>> %LOG_FILE%

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Moritz Bunkus <moritz@bunkus.org>
Date: Tue, 25 Jul 2017 16:46:33 +1000
Subject: [PATCH] perl cwd not in inc anymore


diff --git a/runtest.pl b/runtest.pl
index 1111111..2222222 100755
--- a/runtest.pl
+++ b/runtest.pl
@@ -1,5 +1,9 @@
 #!/usr/bin/env perl
 
+BEGIN {
+  unshift @INC, '.';
+}
+
 # runtest [options] FILENAME
 #
 # Read the file FILENAME. Each line contains a test.