summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEtienne Petrel <etienne.petrel@mongodb.com>2021-08-31 05:00:49 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-31 05:23:12 +0000
commit8ac41e8c057f04a1a0914455ac8ded8b02bb9c92 (patch)
tree9a8a6e6bcbc83e8c0e16c1616b0f4317efc50b3f
parent5c17e17a1d81ab37ac3e74d3f63bb324af8b04c2 (diff)
downloadmongo-8ac41e8c057f04a1a0914455ac8ded8b02bb9c92.tar.gz
Import wiredtiger: b86eb4c244bf3afedd8ebd3611a39b7c709cb3b0 from branch mongodb-master
ref: 026a930bb4..b86eb4c244 for: 5.1.0 WT-8007 Update script to correctly generate new test for the CPP test suite framework
-rw-r--r--src/third_party/wiredtiger/import.data2
-rwxr-xr-xsrc/third_party/wiredtiger/test/cppsuite/create_test.sh18
2 files changed, 10 insertions, 10 deletions
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 99fd14e1dd2..957689fe54b 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "026a930bb418933cddd54d213a39ada253cde1d0"
+ "commit": "b86eb4c244bf3afedd8ebd3611a39b7c709cb3b0"
}
diff --git a/src/third_party/wiredtiger/test/cppsuite/create_test.sh b/src/third_party/wiredtiger/test/cppsuite/create_test.sh
index 5076b43c7c3..2af77e4f584 100755
--- a/src/third_party/wiredtiger/test/cppsuite/create_test.sh
+++ b/src/third_party/wiredtiger/test/cppsuite/create_test.sh
@@ -30,19 +30,19 @@ if test -f "$CONFIG"; then
fi
# Copy the default template.
-cp tests/example_test.cxx $FILE
+cp tests/example_test.cxx "$FILE"
echo "Created $FILE."
-cp configs/example_test_default.txt $CONFIG
+cp configs/example_test_default.txt "$CONFIG"
echo "Created $CONFIG."
# Replace example_test with the new test name.
SEARCH="example_test"
-sed -i "s/$SEARCH/$1/" $FILE
+sed -i "s/$SEARCH/$1/" "$FILE"
echo "Updated $FILE."
# Replace the first line of the configuration file.
REPLACE="# Configuration for $1."
-sed -i "1s/.*/$REPLACE/" $CONFIG
+sed -i "1s/.*/$REPLACE/" "$CONFIG"
echo "Updated $CONFIG."
# Include the new test in run.cxx
@@ -52,9 +52,9 @@ VALUE="#include \"$1.cxx\""
sed -i "/$SEARCH/a $VALUE" $FILE
# Add the new test to the run_test() method
-SEARCH="example_test(config, test_name).run()"
-LINE_1="\ else if (test_name == \"$1\")\n"
-LINE_2="\ $1(config, test_name).run();"
+SEARCH="example_test(test_harness::test_args{config, test_name, wt_open_config}).run();"
+LINE_1="\else if (test_name == \"$1\")\n"
+LINE_2="\\$1(test_harness::test_args{config, test_name, wt_open_config}).run();"
sed -i "/$SEARCH/a $LINE_1$LINE_2" $FILE
# Add the new test to all existing tests.
@@ -72,10 +72,10 @@ echo "Updated $FILE."
# Trigger s_all
echo "Running s_all.."
-cd ../../dist
+cd ../../dist || exit 1
./s_all
# Last changes to be done manually
echo "Follow the next steps to execute your new test:"
echo "1. Start editing $1.cxx"
-echo "2. Compile your changes, go to build_posix/test/cppsuite and run your test with ./run -t $1"
+echo "2. Compile your changes, go to <build_dir>/test/cppsuite and run your test with ./run -t $1"