Commit 2e6bf733 by lwc-tester

compile_all.py now accepts a submissions directory

parent e78ab7e8
......@@ -93,7 +93,6 @@ def find_test_vectors(d):
def main(argv):
submissions_dir = "all-lwc-submission-files"
include_list = None
# Parse the arguments
......@@ -101,15 +100,18 @@ def main(argv):
description='Compiles all LWC submissions for a given template')
argparser.add_argument('-v', '--verbose', action='count')
argparser.add_argument('-t', '--template', default='templates/linux')
argparser.add_argument('-b', '--build-dir')
argparser.add_argument('-i', '--include', action='append')
argparser.add_argument('-t', '--template', default='templates/linux')
argparser.add_argument('-b', '--build-dir', default='build')
argparser.add_argument('-s', '--submissions-dir',
default='all-lwc-submission-files')
args = argparser.parse_args(argv[1:])
template_dir = args.template
build_root_dir = args.build_dir
include_list = args.include
submissions_dir = args.submissions_dir
print("Using template %s" % template_dir)
subs = os.listdir(submissions_dir)
......
......@@ -5,8 +5,9 @@ shopt -s extglob
export PYTHONPATH="$PYTHONPATH:$(pwd)"
function run() {
TEMPLATE="$1"
DESTDIR="$2"
SUBMISSION="$1"
TEMPLATE="$2"
DESTDIR="$3"
if [[ ! -d "templates/$TEMPLATE" ]]; then
echo "Template '$TEMPLATE' does not exist"
......@@ -29,7 +30,7 @@ function run() {
mkdir -p $DESTDIR
echo "Compiling for template '$TEMPLATE' in directory '$TMPDIR'"
./compile_all.py -t "templates/$TEMPLATE" -b "$TMPDIR"
./compile_all.py -s $SUBMISSION -t "templates/$TEMPLATE" -b "$TMPDIR"
for cipher in $TMPDIR/*; do
if [[ ! -d $cipher ]]; then continue; fi
......@@ -73,7 +74,7 @@ function run() {
}
if [[ $1 == "run" ]]; then
run $2 $3
run $2 $3 $4
else
ZIP_PATH="$1"
if [[ ! -f $ZIP_PATH ]]; then
......@@ -89,7 +90,7 @@ else
TEMPLATE="${i##*/}"
echo "Template is $TEMPLATE"
touch $MAINDIR/locky.lock
flock $MAINDIR/locky.lock $0 run $TEMPLATE $MAINDIR/$TEMPLATE
flock $MAINDIR/locky.lock $0 run $TMPDIR $TEMPLATE $MAINDIR/$TEMPLATE
done
rm -rf $TMPDIR
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment