Improve scripts for 2005/giljade
Prompt to run test suite after the main feature is done and improve the prompting. The test suite script gives a warning that it may take a bit of time to run.
This commit is contained in:
1 parent
4f089535b6
commit
f72856c519
3 files changed
+22
-13
No files matched your search
@@ -24,6 +24,9 @@ EXIT_CODE=0
|
||||
# delete temporary files first to make sure that they're clean
|
||||
rm -f out out.count
|
||||
|
||||
echo "This may take a while: please be patient." 1>&2
|
||||
echo 1>&2
|
||||
|
||||
# redirect stdout to 'out' so that we can run the test suite of giljade
|
||||
./"$GILJADE" > out
|
||||
# here we want to show only the lines matching the regexp '^Line' but write
|
||||
|
||||
+16
-10
@@ -15,21 +15,27 @@ make CC="$CC" all >/dev/null || exit 1
|
||||
# clear screen after compilation so that only the entry is shown
|
||||
clear
|
||||
|
||||
read -r -p "Do you wish to run the test suite (y/n) ? "
|
||||
if [[ "$REPLY" == "y" ]]; then
|
||||
echo "$ make test" 1>&2
|
||||
make test
|
||||
fi
|
||||
|
||||
# We don't use tee(1) here so as to show better what we're doing and to prompt
|
||||
# them to view the file with less(1) rather than dump it on them all at once.
|
||||
echo 1>&2
|
||||
read -r -n 1 -p "Press any key to run: ./giljade > out: "
|
||||
echo 1>&2
|
||||
echo "$ ./giljade > out" 1>&2
|
||||
./giljade > out
|
||||
echo 1>&2
|
||||
echo "For this next step, make sure to keep pressing space (or hold it down) (q = quit)." 1>&2
|
||||
echo "$ less -X out" 1>&2
|
||||
read -r -n 1 -p "Press any key to continue: "
|
||||
less -X out
|
||||
read -r -n 1 -p "Press any key to run: less -rEXF out: "
|
||||
less -rEXF out
|
||||
|
||||
echo 1>&2
|
||||
echo "We've left the file 'out' for you in case you wish to open it in vi(m). If" 1>&2
|
||||
echo "you do we recommend you try holding ctrl-f down in a similar way to how you held" 1>&2
|
||||
echo "down space above. Of course you can open it in another editor if you wish." 1>&2
|
||||
echo 1>&2
|
||||
|
||||
read -r -p "Do you wish to run the test suite (y/n) ? "
|
||||
if [[ "$REPLY" == "y" || "$REPLY" = "Y" ]]; then
|
||||
echo "$ make test" 1>&2
|
||||
make test
|
||||
fi
|
||||
|
||||
|
||||
+3
-3
@@ -3201,9 +3201,9 @@ Cody also added the [try.sh](/2005/boutines/try.sh) script.
|
||||
|
||||
## <a name="2005_giljade"></a>[2005/giljade](/2005/giljade/giljade.c) ([README.md](/2005/giljade/README.md]))
|
||||
|
||||
After Landon fixed the entry to compile with clang Cody noticed this does not
|
||||
work at all in modern systems (see below). He fixed this to work and then he
|
||||
later fixed the self-test feature.
|
||||
After Landon fixed the entry to compile with clang [Cody](#cody) noticed this
|
||||
does not work at all in modern systems (see below). He fixed this to work and
|
||||
then he later fixed the self-test feature.
|
||||
|
||||
The problem that was showing up is that with either optimising or if anything
|
||||
but 32-bit (as in `-m32`) was used it would not work (at least in 64-bit
|
||||
|
||||
Reference in new issue
Block a user