Lichen

Change of test_all.sh

918:e6da95e33e43
test_all.sh
     1.1 --- a/test_all.sh	Tue Jun 22 22:49:47 2021 +0200
     1.2 +++ b/test_all.sh	Tue Jun 22 23:03:52 2021 +0200
     1.3 @@ -3,7 +3,7 @@
     1.4  # This tool runs the toolchain for each of the tests, optionally building and
     1.5  # running the test programs.
     1.6  #
     1.7 -# Copyright (C) 2016, 2017 Paul Boddie <paul@boddie.org.uk>
     1.8 +# Copyright (C) 2016, 2017, 2021 Paul Boddie <paul@boddie.org.uk>
     1.9  #
    1.10  # This program is free software; you can redistribute it and/or modify it under
    1.11  # the terms of the GNU General Public License as published by the Free Software
    1.12 @@ -20,6 +20,8 @@
    1.13  
    1.14  PROGNAME=$0
    1.15  OPTION=$1
    1.16 +shift 1
    1.17 +MAKE_OPTIONS="$*"
    1.18  
    1.19  LPLC="./lplc"
    1.20  DATADIR="_main.lplc"
    1.21 @@ -53,7 +55,7 @@
    1.22  
    1.23  if [ "$OPTION" = '--help' ] ; then
    1.24      cat 1>&2 <<EOF
    1.25 -Usage: $0 [ --build | --build-only | --run-built ]
    1.26 +Usage: $0 [ --build | --build-only | --run-built ] [ <make options> ]
    1.27  
    1.28  Run the toolchain over all tests in the tests directory.
    1.29  
    1.30 @@ -87,6 +89,11 @@
    1.31  Build and output logs are stored in the _results directory with the .build and
    1.32  .out suffixes employed respectively, one of each kind for each generated
    1.33  program.
    1.34 +
    1.35 +The make options can be used to specify things like the number of processes
    1.36 +employed to perform a build of each program. For example:
    1.37 +
    1.38 +$PROGNAME --build -j8
    1.39  EOF
    1.40      exit 1
    1.41  fi
    1.42 @@ -193,7 +200,7 @@
    1.43  
    1.44          echo " (build)..." 1>&2
    1.45          if ! make -C "$DATADIR/_generated" clean > "$BUILDLOG" 2>&1 || \
    1.46 -           ! make -C "$DATADIR/_generated" > "$BUILDLOG" 2>&1 ; then
    1.47 +           ! make -C "$DATADIR/_generated" $MAKE_OPTIONS > "$BUILDLOG" 2>&1 ; then
    1.48              exit 1
    1.49          fi
    1.50