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

Make all scripts find test.include file same way #546

Merged
merged 1 commit into from
Dec 3, 2023
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
make all scripts find include file same way
  • Loading branch information
markro49 committed Nov 27, 2023
commit 317886b81550aea3e26227f8a2fc9a717d944214
5 changes: 4 additions & 1 deletion framework/test/test_d4j_query.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
# This script runs a set of basic queries against d4j-query and checks the results
#
################################################################################
source test.include

HERE=$(cd `dirname $0` && pwd)

# Import helper subroutines and variables, and init Defects4J
source "$HERE/test.include" || exit 1
init

$BASE_DIR/framework/bin/defects4j query -p Collections -H >> $HERE"/temp"
result=`diff $HERE/temp $HERE/resources/output/d4j-query/1`

Expand Down
5 changes: 4 additions & 1 deletion framework/test/test_gen_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@
# * Generate for bugs 1-10 and 20: ./test_generate_suites.sh -pLang -b1..10 -b20
#
################################################################################

HERE=$(cd `dirname $0` && pwd)

# Import helper subroutines and variables, and init Defects4J
source test.include
source "$HERE/test.include" || exit 1
init

# Print usage message and exit
Expand Down
5 changes: 4 additions & 1 deletion framework/test/test_sanity_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
# This script runs the sanity check on each project version.
#
################################################################################

HERE=$(cd `dirname $0` && pwd)

# Import helper subroutines and variables, and init Defects4J
source test.include
source "$HERE/test.include" || exit 1
init

for pid in Chart Closure Lang Math Time; do
Expand Down
5 changes: 4 additions & 1 deletion framework/test/test_tutorial.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@
# This script tests the tutorial as described in Defects4J's README file.
#
################################################################################

HERE=$(cd `dirname $0` && pwd)

# Import helper subroutines and variables, and init Defects4J
source test.include
source "$HERE/test.include" || exit 1
init

# Get project info
Expand Down
5 changes: 4 additions & 1 deletion framework/test/test_verify_bugs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
# * Verify bug 2 with DEBUG ./test_verify_bugs.sh -pLang -b 2 -D
#
################################################################################

HERE=$(cd `dirname $0` && pwd)

# Import helper subroutines and variables, and init Defects4J
source test.include
source "$HERE/test.include" || exit 1

Copy link
Owner

Choose a reason for hiding this comment

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

Should there be a call to init here as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is done below after argument processing and checking. I did not change that, but I think we could move it up if you wish.

Copy link
Owner

@rjust rjust Nov 29, 2023

Choose a reason for hiding this comment

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

Good point, I missed this earlier. Unless there is a reason for why init should happen after argument processing, I think we should move this up so that the "source and init" pattern is recognizable and the same for all scripts.

# Print usage message and exit
usage() {
Expand Down
Loading