From 82f9d834ad772b2f16b6524f679d14d8a7afe881 Mon Sep 17 00:00:00 2001
From: Gabriele Contini <gcontini@users.noreply.github.com>
Date: 周二, 10 9月 2019 23:29:10 +0800
Subject: [PATCH] fix issue #37 tests in windows

---
 .travis.yml |   42 ++++++++++++++++++++++++++++++------------
 1 files changed, 30 insertions(+), 12 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 0208224..1b67b9b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -51,32 +51,50 @@
         - docker commit centos7_toconfigure centos7_configured
      script: 
         - docker run --name centos7_make -v `pwd`:/root/open-license-manager centos7_configured /bin/bash -c 
-            "cd /root/open-license-manager/build && make && make install && CTEST_OUTPUT_ON_FAILURE=1 VIRT_ENV=CONTAINER make test"
+            "cd /root/open-license-manager/build && make && make install && VIRT_ENV=CONTAINER make test"
             
    - os: windows
-     name: "Widnows server 1803 - Visual Studio 15 2017 Win64"
+     name: "Widnows server 1803 - Visual Studio 15 2017 Win64 - (/MD)"
+     env:
+        - CACHE_NAME=boost
      cache:
          directories:
              - "/C/local/boost"
      before_script:
-         - ./windows_travis.bat
+         - sc stop CryptSvc
+         - travis_wait 30 ./windows_download_boost.bat
          - cd "/C/Users/travis/build/open-license-manager/open-license-manager"
          - mkdir build
-         - cd build && cmake -G "Visual Studio 15 2017 Win64" -T "host=x64" -DBOOST_ROOT="C:/local/boost" -DCMAKE_INSTALL_PREFIX=../../install ..
+         - cd build && cmake -G "Visual Studio 15 2017 Win64" -DBOOST_ROOT="C:/local/boost" ..
      script:
-          - true
-#         - PATH="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin":$PATH
-#         - MSBuild.exe "license++.sln"
-#         - ctest
-#         - cmake -T "host=x64" -DBOOST_ROOT="C:/local/boost" -DCMAKE_INSTALL_PREFIX=../../install --build .. --target RUN_TESTS
-         
+          - cmake --build . --target install --config Release
+          - ctest -C Release
+
+   - os: windows
+     name: "Widnows server 1803 - Visual Studio 15 2017 Win64 - (/MT)"
+     env:
+        - CACHE_NAME=boost
+     cache:
+         directories:
+             - "/C/local/boost"
+     before_script:
+         #- Regsvr32.exe "C:\Widnows\System32\rsaenh.dll"
+         - travis_wait 30 ./windows_download_boost.bat
+         - cd "/C/Users/travis/build/open-license-manager/open-license-manager"
+         - mkdir build
+         - cd build && cmake -G "Visual Studio 15 2017 Win64" -DBOOST_ROOT="C:/local/boost" -DSTATIC_RUNTIME=1 ..
+     script:
+          - cmake --build . --target install --config Release
+          - ctest -C Release
+           
+env:
+    - CTEST_OUTPUT_ON_FAILURE=1      
 before_script:
     - mkdir build
     - cd build && cmake -DCMAKE_INSTALL_PREFIX=../../install ..
 
-
 script: 
     - make 
     - make install
-    - CTEST_OUTPUT_ON_FAILURE=1 make test
+    - make test
     

--
Gitblit v1.9.1