2016-05-09 02:11:51 +00:00
|
|
|
#!/bin/bash
|
2019-07-27 23:01:55 +00:00
|
|
|
# Repeatedly stop building until successive layers, and run all tests built.
|
2016-05-09 05:36:30 +00:00
|
|
|
#
|
2019-07-27 23:01:55 +00:00
|
|
|
# Assumes .subx files all come after .cc files.
|
2016-05-09 01:56:32 +00:00
|
|
|
|
2019-07-27 23:01:55 +00:00
|
|
|
set -e
|
2016-06-02 20:17:21 +00:00
|
|
|
|
2019-07-27 23:01:55 +00:00
|
|
|
cd `dirname $0`
|
|
|
|
# add C++ files one at a time
|
|
|
|
for f in [0-9]*cc
|
2016-05-09 01:56:32 +00:00
|
|
|
do
|
2020-08-03 00:32:01 +00:00
|
|
|
echo "=== bootstrap $f"
|
2019-07-27 23:01:55 +00:00
|
|
|
./build_and_test_until $f
|
2016-05-09 01:56:32 +00:00
|
|
|
done
|
|
|
|
|
2019-07-27 23:01:55 +00:00
|
|
|
# build everything one last time
|
2016-10-06 23:39:23 +00:00
|
|
|
./clean
|
2019-08-14 22:45:24 +00:00
|
|
|
./build # build optimized since we'll be running it repeatedly below
|
2016-05-09 05:36:30 +00:00
|
|
|
|
2020-08-03 00:32:01 +00:00
|
|
|
# test pure-SubX files (without syntax sugar) one at a time using bootstrap
|
2020-07-05 19:42:28 +00:00
|
|
|
for f in [012]*.subx
|
2019-07-27 23:01:55 +00:00
|
|
|
do
|
2020-08-03 00:32:01 +00:00
|
|
|
echo "=== bootstrap $f"
|
2020-01-02 09:41:55 +00:00
|
|
|
./bootstrap translate init.linux $(tools/enumerate --until $f |grep '\.subx$') -o a.elf
|
|
|
|
./bootstrap run a.elf test
|
2019-07-27 23:01:55 +00:00
|
|
|
echo
|
|
|
|
test `uname` = 'Linux' && {
|
|
|
|
chmod +x a.elf
|
2019-09-20 04:01:43 +00:00
|
|
|
./a.elf test
|
2019-07-27 23:01:55 +00:00
|
|
|
echo
|
|
|
|
} || true
|
|
|
|
done
|
2020-08-03 00:32:01 +00:00
|
|
|
|
|
|
|
# test all SubX files one at a time using the self-hosted translator
|
|
|
|
for f in [0-9]*.subx
|
|
|
|
do
|
|
|
|
echo "=== self-hosted $f"
|
|
|
|
./translate_subx init.linux $(tools/enumerate --until $f |grep '\.subx$')
|
|
|
|
./bootstrap run a.elf test
|
|
|
|
echo
|
|
|
|
test `uname` = 'Linux' && {
|
|
|
|
chmod +x a.elf
|
|
|
|
./a.elf test
|
|
|
|
echo
|
|
|
|
} || true
|
|
|
|
done
|
|
|
|
|
|
|
|
# test all Mu files one at a time using the self-hosted translator
|
|
|
|
for f in [0-9]*.mu
|
|
|
|
do
|
|
|
|
echo "=== self-hosted $f"
|
|
|
|
cat $(tools/enumerate --until $f |grep '\.mu$') |apps/mu > a.subx
|
|
|
|
./translate_subx init.linux [0-9]*.subx a.subx
|
|
|
|
./bootstrap run a.elf test
|
|
|
|
echo
|
|
|
|
test `uname` = 'Linux' && {
|
|
|
|
chmod +x a.elf
|
|
|
|
./a.elf test
|
|
|
|
echo
|
|
|
|
} || true
|
|
|
|
done
|