The file create_test.sh can be used to generate a new test in the CPP framework. Some changes made in WT-7539 broke the correct generation of a new test.
To reproduce:
# Generate the test ./create_test.sh some_test # Compile ... # Execute the test ./run -t some_test [2021-08-27T06:33:06.976717682Z][TID:140489733315328][ERROR]: Test not found: some_test [2021-08-27T06:33:06.976762163Z][TID:140489733315328][ERROR]: Test some_test failed.
The traces show that the test was not found. Indeed, we miss the generation of those two lines in run.cxx:
    else if (test_name == "some_test")
        some_test(test_harness::test_args{config, test_name, wt_open_config}).run(); 
Suggested fix (we need to update the source code that is being looked up):
diff --git a/test/cppsuite/create_test.sh b/test/cppsuite/create_test.sh
index 5076b43c7..01cdefc64 100755
--- a/test/cppsuite/create_test.sh
+++ b/test/cppsuite/create_test.sh
@@ -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 
Definition of done:
The new test runs successfully when executed after being created using the script.
# Generate the test ./create_test.sh some_test # Compile ... # Execute the test ./run -t some_test populate: nothing done.
- is caused by
 - 
                    
WT-7539 Add a configuration option that allows the user to specify debug modes.
-         
 - Closed
 
 -