@@ -6383,16 +6383,11 @@ enum class ParseMode
63836383};
63846384
63856385void append_mode (
6386- std::string const &extension ,
6386+ std::string const &filename ,
63876387 bool variableBased,
63886388 ParseMode parseMode,
63896389 std::string jsonConfig = " {}" )
63906390{
6391-
6392- std::string filename =
6393- (variableBased ? " ../samples/append/append_variablebased."
6394- : " ../samples/append/append_groupbased." ) +
6395- extension;
63966391 if (auxiliary::directory_exists (" ../samples/append" ))
63976392 {
63986393 auxiliary::remove_directory (" ../samples/append" );
@@ -6559,11 +6554,11 @@ void append_mode(
65596554 break ;
65606555 }
65616556 }
6557+ // AppendAfterSteps has a bug before that version
65626558#if 100000000 * ADIOS2_VERSION_MAJOR + 1000000 * ADIOS2_VERSION_MINOR + \
65636559 10000 * ADIOS2_VERSION_PATCH + 100 * ADIOS2_VERSION_TWEAK >= \
65646560 208002700
6565- // AppendAfterSteps has a bug before that version
6566- if (extension == " bp5" )
6561+ if (auxiliary::ends_with (filename, " .bp5" ))
65676562 {
65686563 {
65696564 Series write (
@@ -6669,22 +6664,55 @@ TEST_CASE("append_mode", "[serial]")
66696664 if (t == " bp5" )
66706665 {
66716666 append_mode (
6672- t, false , ParseMode::LinearWithoutSnapshot, jsonConfigOld);
6673- append_mode (t, false , ParseMode::WithSnapshot, jsonConfigNew);
6674- append_mode (t, true , ParseMode::WithSnapshot, jsonConfigOld);
6675- append_mode (t, true , ParseMode::WithSnapshot, jsonConfigNew);
6667+ " ../samples/append/groupbased." + t,
6668+ false ,
6669+ ParseMode::LinearWithoutSnapshot,
6670+ jsonConfigOld);
6671+ append_mode (
6672+ " ../samples/append/groupbased_newschema." + t,
6673+ false ,
6674+ ParseMode::WithSnapshot,
6675+ jsonConfigNew);
6676+ append_mode (
6677+ " ../samples/append/variablebased." + t,
6678+ true ,
6679+ ParseMode::WithSnapshot,
6680+ jsonConfigOld);
6681+ append_mode (
6682+ " ../samples/append/variablebased_newschema." + t,
6683+ true ,
6684+ ParseMode::WithSnapshot,
6685+ jsonConfigNew);
66766686 }
6677- else if (t == " bp" || t == " bp4" || t == " bp5 " )
6687+ else if (t == " bp" || t == " bp4" )
66786688 {
66796689 append_mode (
6680- t, false , ParseMode::AheadOfTimeWithoutSnapshot, jsonConfigOld);
6681- append_mode (t, false , ParseMode::WithSnapshot, jsonConfigNew);
6682- append_mode (t, true , ParseMode::WithSnapshot, jsonConfigOld);
6683- append_mode (t, true , ParseMode::WithSnapshot, jsonConfigNew);
6690+ " ../samples/append/append_groupbased." + t,
6691+ false ,
6692+ ParseMode::AheadOfTimeWithoutSnapshot,
6693+ jsonConfigOld);
6694+ append_mode (
6695+ " ../samples/append/append_groupbased." + t,
6696+ false ,
6697+ ParseMode::WithSnapshot,
6698+ jsonConfigNew);
6699+ append_mode (
6700+ " ../samples/append/append_variablebased." + t,
6701+ true ,
6702+ ParseMode::WithSnapshot,
6703+ jsonConfigOld);
6704+ append_mode (
6705+ " ../samples/append/append_variablebased." + t,
6706+ true ,
6707+ ParseMode::WithSnapshot,
6708+ jsonConfigNew);
66846709 }
66856710 else
66866711 {
6687- append_mode (t, false , ParseMode::NoSteps);
6712+ append_mode (
6713+ " ../samples/append/append_groupbased." + t,
6714+ false ,
6715+ ParseMode::NoSteps);
66886716 }
66896717 }
66906718}
0 commit comments