Commit f56eb85227bbcc7bd81232a338655146385a77ca

DJ Delorie 2021-06-15T08:50:20

Don't stop test on copy failure (#636) * 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

diff --git a/.appveyor.yml b/.appveyor.yml
index 1f82089..48fbb4d 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -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
index 0000000..93f4773
--- /dev/null
+++ b/.appveyor/site.exp
@@ -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
index 0000000..9796cfa
--- /dev/null
+++ b/.appveyor/unix-noexec.exp
@@ -0,0 +1,7 @@
+load_generic_config "remote"
+
+proc noexec_load { dest prog args } {
+  return "unsupported"  
+}
+
+set_board_info protocol "noexec"
diff --git a/.travis.yml b/.travis.yml
index 8db2ddf..a18919c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -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