diff --git a/Sanity/upstream-scripttests/runtest.sh b/Sanity/upstream-scripttests/runtest.sh index 8caa7ef..1d3bb78 100755 --- a/Sanity/upstream-scripttests/runtest.sh +++ b/Sanity/upstream-scripttests/runtest.sh @@ -104,9 +104,17 @@ rlJournalStart rlRun "RUBY_CFLAGS='`ruby -r rbconfig -e "puts RbConfig::CONFIG['CFLAGS']"`'" 0 "Get ruby CFLAGS" rlRun "export CFLAGS='$RUBY_CFLAGS'" 0 "Set ruby CFLAGS" + # Centos Stream 11 and Fedora 42+ defaults to C23 standard, Vim currently does not work with it + # https://github.com/vim/vim/issues/16575 - set the older standard + if rlIsRHELLike '>10' || rlIsFedora '>=42' + then + rlRun "export STD_FLAG='-std=c17'" + fi + # show relevant info & ENV variables rlLog "TEST: $TEST" rlLog "CONFOPT: $CONFOPT" + rlLog "STD_FLAG: $STD_FLAG" rlLog "TERM (default): $TERM" rlLog "TERM (testing): $TERM_type" rlRun -l "vim --version" @@ -134,7 +142,7 @@ rlJournalStart rlRun "TERM=$TERM_type" # following block of code is taken from upstream travis.yml - rlRun "su $TESTER -c './configure ${CONFOPT} CFLAGS=\"${CFLAGS} $RUBY_FLAGS -std=c17\"'" 0 "Configure Vim" + rlRun "su $TESTER -c './configure ${CONFOPT} CFLAGS=\"${CFLAGS} ${RUBY_FLAGS} ${STD_FLAG}\" $RPM_WORKAROUND'" 0 "Configure Vim" rlRun "su $TESTER -c 'make'" 0 "Build the binary which we substitute" rlRun "su $TESTER -c 'ln -sf /usr/bin/vim src/vim'" 0 "Create symlink to installed vim for testing" rlRun "su $TESTER -c 'TERM=$TERM_type make ${TEST} |& tee output_main'" 0,2 "Run tests (skip builtin terminal errors)" diff --git a/Sanity/upstream-unittests/runtest.sh b/Sanity/upstream-unittests/runtest.sh index bf49a7b..81f439e 100755 --- a/Sanity/upstream-unittests/runtest.sh +++ b/Sanity/upstream-unittests/runtest.sh @@ -80,9 +80,17 @@ rlJournalStart # we need to set several env variable randomly to get configure working again... rlRun "RPM_WORKAROUND='RPM_ARCH=\"x86_64\" RPM_PACKAGE_RELEASE=\"1\" RPM_PACKAGE_VERSION=\"1\" RPM_PACKAGE_NAME=\"vim\"'" + # Centos Stream 11 and Fedora 42+ defaults to C23 standard, Vim currently does not work with it + # https://github.com/vim/vim/issues/16575 - set the older standard + if rlIsRHELLike '>10' || rlIsFedora '>=42' + then + rlRun "export STD_FLAG='-std=c17'" + fi + # show relevant info & ENV variables rlLog "TEST: $TEST" rlLog "CONFOPT: $CONFOPT" + rlLog "STD_FLAG: $STD_FLAG" rlLog "FEATURES: $FEATURES" rlLog "TERM (default): $TERM" rlLog "TERM (testing): $TERM_type" @@ -95,7 +103,7 @@ rlJournalStart rlRun "TERM=$TERM_type" # following block of code is taken from upstream travis.yml - rlRun "su $TESTER -c './configure ${CONFOPT} CFLAGS=\"${CFLAGS} $RUBY_FLAGS -std=c17\" $RPM_WORKAROUND'" 0 "Configure Vim" + rlRun "su $TESTER -c './configure ${CONFOPT} CFLAGS=\"${CFLAGS} ${RUBY_FLAGS} ${STD_FLAG}\" $RPM_WORKAROUND'" 0 "Configure Vim" rlRun "su $TESTER -c '$RPM_WORKAROUND make'" 0 "Build the binary which we substitute" rlRun "su $TESTER -c 'ln -sf /usr/bin/vim src/vim'" 0 "Create symlink to installed vim for testing" rlRun "su $TESTER -c 'make ${TEST} |& tee output'" 0,2 "Run tests (skip builtin terminal errors)"