Some test running.
This commit is contained in:
@ -12,10 +12,13 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
Alias('posix', 'posix/ueforth')
|
|
||||||
Importation('gen/posix_boot.h', '$src/posix/posix_boot.fs', name='boot')
|
Importation('gen/posix_boot.h', '$src/posix/posix_boot.fs', name='boot')
|
||||||
Compile('posix/ueforth', '$src/posix/main.c',
|
Compile('posix/ueforth', '$src/posix/main.c',
|
||||||
implicit=['gen/posix_boot.h'])
|
implicit=['gen/posix_boot.h'])
|
||||||
|
|
||||||
|
Alias('posix', ' '.join([
|
||||||
|
ForthTest('tests/posix_all_tests.out', 'posix/ueforth', '$src/common/all_tests.fs'),
|
||||||
|
]))
|
||||||
|
|
||||||
OneShot('install', 'sudo cp posix/ueforth /usr/bin/ueforth',
|
OneShot('install', 'sudo cp posix/ueforth /usr/bin/ueforth',
|
||||||
'posix/ueforth', pool='console')
|
'posix/ueforth', pool='console')
|
||||||
|
|||||||
@ -222,6 +222,12 @@ rule oneshot
|
|||||||
description = ONESHOT
|
description = ONESHOT
|
||||||
command = echo oneshot
|
command = echo oneshot
|
||||||
|
|
||||||
|
rule forth_test
|
||||||
|
description = FORTH_TEST
|
||||||
|
depfile = $out.d
|
||||||
|
deps = gcc
|
||||||
|
command = $src/tools/importation.py -i $test -o $out --depsout $depfile --no-out && $interp $forth $test >$out
|
||||||
|
|
||||||
rule clean
|
rule clean
|
||||||
description = CLEAN
|
description = CLEAN
|
||||||
command = ninja -t clean
|
command = ninja -t clean
|
||||||
@ -355,6 +361,17 @@ def OneShot(target, command, source, pool=None):
|
|||||||
return target
|
return target
|
||||||
|
|
||||||
|
|
||||||
|
def ForthTest(target, forth, test, interp='', pool=None):
|
||||||
|
global output
|
||||||
|
output += f'build {target}: forth_test {forth} {test}\n'
|
||||||
|
output += f' forth = {forth}\n'
|
||||||
|
output += f' test = {test}\n'
|
||||||
|
output += f' interp = {interp}\n'
|
||||||
|
if pool:
|
||||||
|
output += f' pool = {pool}\n'
|
||||||
|
return target
|
||||||
|
|
||||||
|
|
||||||
def Default(target):
|
def Default(target):
|
||||||
global output
|
global output
|
||||||
output += f'default {target}\n'
|
output += f'default {target}\n'
|
||||||
|
|||||||
@ -21,14 +21,20 @@ Importation('gen/windows_boot_extra.h', '$src/windows/windows_boot_extra.fs',
|
|||||||
header_mode='win', name='boot_extra')
|
header_mode='win', name='boot_extra')
|
||||||
|
|
||||||
# Compile Win32.
|
# Compile Win32.
|
||||||
Alias('win32', 'windows/uEf32.exe')
|
Alias('win32', ' '.join([
|
||||||
|
ForthTest('tests/win32_all_tests.out', 'windows/uEf32.exe', '$src/common/all_tests.fs',
|
||||||
|
interp='wine', pool='console'),
|
||||||
|
]))
|
||||||
CompileW32('windows/uEf32.obj', '$src/windows/main.c',
|
CompileW32('windows/uEf32.obj', '$src/windows/main.c',
|
||||||
implicit=['gen/windows_boot.h', 'gen/windows_boot_extra.h'])
|
implicit=['gen/windows_boot.h', 'gen/windows_boot_extra.h'])
|
||||||
LinkW32('windows/uEf32.exe',
|
LinkW32('windows/uEf32.exe',
|
||||||
' '.join(['windows/uEf32.obj', 'resources/ueforth_res32.res']))
|
' '.join(['windows/uEf32.obj', 'resources/ueforth_res32.res']))
|
||||||
|
|
||||||
# Compile Win64.
|
# Compile Win64.
|
||||||
Alias('win64', 'windows/uEf64.exe')
|
Alias('win64', ' '.join([
|
||||||
|
ForthTest('tests/win64_all_tests.out', 'windows/uEf64.exe', '$src/common/all_tests.fs',
|
||||||
|
interp='wine', pool='console'),
|
||||||
|
]))
|
||||||
CompileW64('windows/uEf64.obj', '$src/windows/main.c',
|
CompileW64('windows/uEf64.obj', '$src/windows/main.c',
|
||||||
implicit=['gen/windows_boot.h', 'gen/windows_boot_extra.h'])
|
implicit=['gen/windows_boot.h', 'gen/windows_boot_extra.h'])
|
||||||
LinkW64('windows/uEf64.exe',
|
LinkW64('windows/uEf64.exe',
|
||||||
|
|||||||
Reference in New Issue
Block a user