From 49641a34fd1a48e419878fd7eea6c6831575af30 Mon Sep 17 00:00:00 2001 From: Zdenek Dohnal Date: Tue, 4 Feb 2025 14:15:51 +0100 Subject: [PATCH] Enforce -std=c17 --- Sanity/upstream-scripttests/runtest.sh | 6 +++--- Sanity/upstream-unittests/runtest.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Sanity/upstream-scripttests/runtest.sh b/Sanity/upstream-scripttests/runtest.sh index 500eb3f..8caa7ef 100755 --- a/Sanity/upstream-scripttests/runtest.sh +++ b/Sanity/upstream-scripttests/runtest.sh @@ -36,10 +36,10 @@ SET_XVFB="NO" # Do we want to setup `Xvfb` before testing? TERM_type="xterm-256color" # terminfo type set before running tests set -o pipefail # because test output is piped to `tee` -if rlIsRHEL 8 +if rlIsRHELLike 8 then CONFOPT="--build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-features=huge --enable-python3interp=dynamic --enable-perlinterp=dynamic --disable-tclinterp --with-x=no --enable-gui=no --enable-multibyte --enable-cscope --with-tlib=ncurses --enable-fips-warning --enable-netbeans --enable-rubyinterp=dynamic --enable-luainterp=dynamic" -elif rlIsRHEL 9 +elif rlIsRHELLike 9 then CONFOPT="--build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-features=huge --enable-python3interp=dynamic --enable-perlinterp=dynamic --disable-tclinterp --with-x=no --enable-gui=no --enable-multibyte --enable-cscope --with-tlib=ncurses --enable-fips-warning --enable-netbeans --enable-rubyinterp=dynamic --enable-luainterp=dynamic --disable-canberra" else @@ -134,7 +134,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\"'" 0 "Configure Vim" + rlRun "su $TESTER -c './configure ${CONFOPT} CFLAGS=\"${CFLAGS} $RUBY_FLAGS -std=c17\"'" 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 75b6395..bf49a7b 100755 --- a/Sanity/upstream-unittests/runtest.sh +++ b/Sanity/upstream-unittests/runtest.sh @@ -95,7 +95,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\" $RPM_WORKAROUND'" 0 "Configure Vim" + rlRun "su $TESTER -c './configure ${CONFOPT} CFLAGS=\"${CFLAGS} $RUBY_FLAGS -std=c17\" $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)"