Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass program source file to test.sh in basic. #178

Merged
merged 1 commit into from
May 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tests/encore/basic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ENCORE_SOURCES=$(shell ls *.enc)
ENCORE_TARGETS=$(ENCORE_SOURCES:.enc=)

test: embed_tl.o
@./test.sh $(ENCORE_TARGETS)
@./test.sh $(ENCORE_SOURCES)

embed_tl.o: embed_tl.c embed_tl.h
clang -c embed_tl.c
Expand Down
7 changes: 4 additions & 3 deletions src/tests/encore/basic/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function run_test {
# piped into that script. The test is successful iff the script
# returns normally (exit 0).

program=$1
source=$1.enc
source=$1
program=${source%.enc}
# compile and, if successful, run the program:
output=$(${ENCOREC} $source && ./$program)
checking_script=./$program.chk
Expand Down Expand Up @@ -48,11 +48,12 @@ passed=0
failed=0
failed_list=()

# skipped=(async.enc)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line could be removed -- perhaps replaced by a comment stating what the purpose of skipped is.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's kept there on purpose to show the format how it's used. I thought the name skipped is self-documenting.

skipped=()
progs=("$@")
for rm in "${skipped[@]}"
do
progs=(${progs[@]/$rm})
progs=(${progs[@]/#$rm})
done
for prog in "${progs[@]}"
do
Expand Down