Don't stop test on copy failure (#636)
authorDJ Delorie <dj@delorie.com>
Tue, 15 Jun 2021 12:50:20 +0000 (08:50 -0400)
committerGitHub <noreply@github.com>
Tue, 15 Jun 2021 12:50:20 +0000 (08:50 -0400)
* Don't stop test on copy failure

Static-library tests were failing only because there were
no DLLs to copy.  This change makes a copy failure not stop
the build; if a failed copy would otherwise be relevent, the
later tests would fail anyway.

While there are more clever ways to solve this, a brute force
fix is sufficient.

* [TEST] Try cygwin64; install more packages explicitly

* use correct cygwin64 directory name

appveyor has cygwin64 pre-installed in /cygwin64, and 32-bit cygwin
in /cygwin

* More testing - revert VS change, bump travis timeout

* Add -g to update the rest of perl

* Skip execution tests on non-native platforms

Special site.exp that skips the unix_load() command for arm platforms.

Unset TERM to avoid cruft in stdout

Try harder to find the libffi libraries

.appveyor.yml
.appveyor/site.exp [new file with mode: 0644]
.appveyor/unix-noexec.exp [new file with mode: 0644]
.travis.yml

index 1f820899aebe5e76bffa33f69ea9c26049429edc..48fbb4df2a51ebcbfd167020e140e04eac4cd4ad 100644 (file)
@@ -21,8 +21,8 @@ configuration:
 
 environment:
   global:
-    CYG_ROOT: C:/cygwin
-    CYG_CACHE: C:/cygwin/var/cache/setup
+    CYG_ROOT: C:/cygwin64
+    CYG_CACHE: C:/cygwin64/var/cache/setup
     CYG_MIRROR: http://mirrors.kernel.org/sourceware/cygwin/
     VSVER: 15
   matrix:
@@ -61,8 +61,8 @@ install:
         } Else {
           $env:DEBUG_ARG="--disable-debug"
       }
-  - 'appveyor DownloadFile https://cygwin.com/setup-x86.exe -FileName setup.exe'
-  - 'setup.exe -qnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu,automake'
+  - 'appveyor DownloadFile https://cygwin.com/setup-x86_64.exe -FileName setup.exe'
+  - 'setup.exe -qgnNdO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P dejagnu -P autoconf -P automake -P libtool'
   - '%CYG_ROOT%/bin/bash -lc "cygcheck -dc cygwin"'
   - echo call VsDevCmd to set VS150COMNTOOLS
   - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat"
@@ -71,13 +71,14 @@ install:
   - call "%VSCOMNTOOLS%..\..\vc\Auxiliary\Build\vcvarsall.bat" %VCVARS_PLATFORM%
 
 build_script:
-  - c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./autogen.sh)"
-  - c:\cygwin\bin\sh -lc "(cd $OLDPWD; ./configure CC='%MSVCC%' CXX='%MSVCC%' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='/cygdrive/c/projects/libffi/.travis/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST $DEBUG_ARG $SHARED_ARG)"
-  - c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp src/%SRC_ARCHITECTURE%/ffitarget.h include)"
-  - c:\cygwin\bin\sh -lc "(cd $OLDPWD; make)"
-  - c:\cygwin\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/)"
-  - c:\cygwin\bin\sh -lc "(cd $OLDPWD; make check RUNTESTFLAGS='-v -v -v -v')"
+  - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; ./autogen.sh)"
+  - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; ./configure CC='%MSVCC%' CXX='%MSVCC%' LD='link' CPP='cl -nologo -EP' CXXCPP='cl -nologo -EP' CPPFLAGS='-DFFI_BUILDING_DLL' AR='/cygdrive/c/projects/libffi/.travis/ar-lib lib' NM='dumpbin -symbols' STRIP=':' --build=$BUILD --host=$HOST $DEBUG_ARG $SHARED_ARG)"
+  - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cp src/%SRC_ARCHITECTURE%/ffitarget.h include)"
+  - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; make)"
+  - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cp $HOST/.libs/libffi.lib $HOST/testsuite/libffi-8.lib || true)"
+  - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cp `find . -name 'libffi-?.dll'` $HOST/testsuite/ || true)"
+  - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; TERM=none make check RUNTESTFLAGS='-v -v -v -v --target '$HOST  DEJAGNU=$PWD/.appveyor/site.exp SITEDIR=$PWD/.appveyor)"
 
 
 on_finish:
-  - c:\cygwin\bin\sh -lc "(cd $OLDPWD; cat `find ./ -name libffi.log`)"
+  - c:\cygwin64\bin\sh -lc "(cd $OLDPWD; cat `find ./ -name libffi.log`)"
diff --git a/.appveyor/site.exp b/.appveyor/site.exp
new file mode 100644 (file)
index 0000000..93f4773
--- /dev/null
@@ -0,0 +1,16 @@
+# Copyright (C) 2021  Anthony Green
+
+lappend boards_dir $::env(SITEDIR)
+
+verbose "Global Config File: target_triplet is $target_triplet" 1
+global target_list
+
+case "$target_triplet" in {
+    { "aarch*cygwin*" } {
+       set target_list "unix-noexec"
+    }
+    { "arm*cygwin*" } {
+       set target_list "unix-noexec"
+    }
+}
+
diff --git a/.appveyor/unix-noexec.exp b/.appveyor/unix-noexec.exp
new file mode 100644 (file)
index 0000000..9796cfa
--- /dev/null
@@ -0,0 +1,7 @@
+load_generic_config "remote"
+
+proc noexec_load { dest prog args } {
+  return "unsupported"  
+}
+
+set_board_info protocol "noexec"
index 8db2ddfb24d636e0e4e4f1488201e6c291e5d3af..a18919cd9a0f06d9a4116f4fc159cf10b9b73282 100644 (file)
@@ -75,7 +75,7 @@ before_install:
   - if test x"$MEVAL" != x; then eval ${MEVAL}; fi
 
 install:
-  - travis_wait 30 ./.travis/install.sh
+  - travis_wait 60 ./.travis/install.sh
 
 script:
   - if ! test x"$MEVAL" = x; then eval ${MEVAL}; fi