diff --git a/.github/workflows/testsuite_oneprocess.sh b/.github/workflows/testsuite_oneprocess.sh index b9da6033e6..97a679f9c0 100755 --- a/.github/workflows/testsuite_oneprocess.sh +++ b/.github/workflows/testsuite_oneprocess.sh @@ -35,16 +35,20 @@ function codegen() { ./CODEGEN/generateAndCompare.sh -q ${proc%.sa} fi # Check if there are any differences to the current repo - git checkout HEAD ${proc}/CODEGEN*.txt - if [ "${proc%.mad}" != "${proc}" ]; then - git checkout HEAD ${proc}/Cards/me5_configuration.txt - ###sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' ${proc}/Source/make_opts - git checkout HEAD ${proc}/Source/make_opts + compare=true # enable comparison to current git repo + ###compare=false # disable comparison to current git repo + if [ ${compare} ] && [ "$(git ls-tree --name-only HEAD ${proc})" != "" ]; then + git checkout HEAD ${proc}/CODEGEN*.txt + if [ "${proc%.mad}" != "${proc}" ]; then + git checkout HEAD ${proc}/Cards/me5_configuration.txt + ###sed -i 's/DEFAULT_F2PY_COMPILER=f2py.*/DEFAULT_F2PY_COMPILER=f2py3/' ${proc}/Source/make_opts + git checkout HEAD ${proc}/Source/make_opts + fi + echo + echo "git diff (start)" + git diff --exit-code + echo "git diff (end)" fi - echo - echo "git diff (start)" - git diff --exit-code - echo "git diff (end)" } #----------------------------------------------------------------------------------------------------------------------------------