diff --git a/src/lammps.cpp b/src/lammps.cpp index 1c7d12f79c..956793c20a 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -132,6 +132,12 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) : num_ver = utils::date2num(version); restart_ver = -1; + // append git descriptor info to update string when compiling development or maintenance version + + std::string update_string = UPDATE_STRING; + if (has_git_info() && (update_string == " - Development") || (update_string == " - Maintenance")) + update_string += fmt::format(" - {}", git_descriptor()); + external_comm = 0; mdicomm = nullptr; @@ -524,7 +530,7 @@ LAMMPS::LAMMPS(int narg, char **arg, MPI_Comm communicator) : if (infile == nullptr) error->one(FLERR,"Cannot open input script {}: {}", arg[inflag], utils::getsyserror()); if (!helpflag) - utils::logmesg(this,fmt::format("LAMMPS ({}{})\n",version,UPDATE_STRING)); + utils::logmesg(this,fmt::format("LAMMPS ({}{})\n", version, update_string)); // warn against using I/O redirection in parallel runs if ((inflag == 0) && (universe->nprocs > 1)) diff --git a/unittest/CMakeLists.txt b/unittest/CMakeLists.txt index f41e8a2878..f7be54f9ae 100644 --- a/unittest/CMakeLists.txt +++ b/unittest/CMakeLists.txt @@ -54,7 +54,7 @@ add_test(NAME RunLammps COMMAND $ -log none -echo none -in in.empty) set_tests_properties(RunLammps PROPERTIES ENVIRONMENT "TSAN_OPTIONS=ignore_noninstrumented_modules=1;HWLOC_HIDE_ERRORS=2" - PASS_REGULAR_EXPRESSION "LAMMPS \\([0-9]+ [A-Za-z]+ 2[0-9][0-9][0-9]( - Update [0-9]+)?( - Development)?( - Maintenance)?\\)") + PASS_REGULAR_EXPRESSION "LAMMPS \\([0-9]+ [A-Za-z]+ 2[0-9][0-9][0-9]( - Update [0-9]+)?( - Development.*)?( - Maintenance.*)?\\)") # check if the compiled executable will print the help message add_test(NAME HelpMessage