From e92f29604528c269c6ba0ce25df9da0cc29e0d78 Mon Sep 17 00:00:00 2001 From: rjust Date: Thu, 9 May 2024 11:31:14 -0700 Subject: [PATCH] Do not mutate during compilation unless an mml file is specified. --- init.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/init.sh b/init.sh index 329be169a..e6b9e27e9 100755 --- a/init.sh +++ b/init.sh @@ -136,6 +136,12 @@ cd "$DIR_REPOS" && ./get_repos.sh # # Download Major # +# Adapt Major's default wrapper scripts: +# - set headless to true to support Chart on machines without X. +# - do not mutate code unless an MML is specified (for historical reasons, +# major v1 was sometimes called without specifying an MML to simply act as +# javac; Major v2+'s default is to generate all mutants as opposed to none). +# echo echo "Setting up Major ... " MAJOR_VERSION="3.0.0" @@ -145,7 +151,9 @@ cd "$BASE" && rm -rf major \ && download_url_and_unzip "$MAJOR_URL/$MAJOR_ZIP" \ && rm "$MAJOR_ZIP" \ && perl -pi -e '$_ .= qq( -Djava.awt.headless=true \\\n) if /CodeCacheSize/' \ - major/bin/ant # Support Chart on machines without X. + major/bin/ant \ + && perl -pi -e '$_ .= qq(\nif [ -z "\$MML" ]; then javac \$*; exit \$?; fi\n) if /REFACTOR=/' \ + major/bin/major \ ################################################################################ #