Skip to content

Commit 698f671

Browse files
authored
Merge pull request #27 from isuruf/test
Test
2 parents 702a0dc + 2e4bc45 commit 698f671

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

.appveyor.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
environment:
2-
CONDA_INSTALL_LOCN: C:\\Miniconda36-x64
3-
41
branches:
52
only:
63
- master
74
- windows
85

6+
environment:
7+
global:
8+
MSYS2_ROOT: C:\msys64
9+
CONDA_INSTALL_LOCN: C:\\Miniconda36-x64
10+
PYTHON2_LOCN: C:\\Python27-x64
11+
912
platform:
1013
- x64
1114

@@ -18,15 +21,17 @@ install:
1821
- cmd: conda config --add channels conda-forge
1922
- cmd: conda config --add channels isuruf/label/flang
2023
- cmd: conda install --yes --quiet clangdev openmp cmake
21-
24+
- cmd: set "PATH=%PYTHON2_LOCN%\Scripts;%PYTHON2_LOCN%;%PATH%"
25+
- cmd: appveyor DownloadFile "https://raw.githubusercontent.com/isuruf/flang/utils/llvm_utils_for_flang.zip" -FileName "utils.zip"
26+
- cmd: 7z x -oC:\llvm_src utils.zip
2227

2328
build_script:
2429
- mkdir build
2530
- cd build
2631
- set "PATH=%cd%\bin;%PATH%"
2732
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
2833
- ps: |
29-
cmake -G "NMake Makefiles" -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release ..
34+
cmake -G "NMake Makefiles" -DFLANG_INCLUDE_TESTS=ON -DFLANG_TEST_VERBOSE_MODE=ON -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_Fortran_COMPILER=flang -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_INCLUDE_TESTS=ON -DLLVM_MAIN_SRC_DIR=C:\llvm_src ..
3035
Push-AppveyorArtifact .\CMakeFiles\CMakeOutput.log
3136
Push-AppveyorArtifact .\CMakeFiles\CMakeError.log
3237
- ps: |
@@ -39,3 +44,12 @@ build_script:
3944
- ps: Compress-Archive -Path C:\projects\flang\build\lib -DestinationPath C:\Projects\flang\lib.zip
4045
- ps: Push-AppveyorArtifact C:\Projects\flang\lib.zip
4146

47+
test_script:
48+
- cmd: set "PATH=%MSYS2_ROOT%\usr\bin\;%PATH%"
49+
- cmd: copy lib\flangmain.lib %CONDA_INSTALL_LOCN%\Library\lib
50+
- cmd: copy lib\flangrti.lib %CONDA_INSTALL_LOCN%\Library\lib
51+
- cmd: copy lib\flang.lib %CONDA_INSTALL_LOCN%\Library\lib
52+
- cmd: copy lib\ompstub.lib %CONDA_INSTALL_LOCN%\Library\lib
53+
- cmd: nmake FileCheck
54+
- cmd: copy bin\FileCheck.exe binFileCheck.exe
55+
#- cmd: nmake check-flang

test/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515
#
1616

17+
message(STATUS "Building test suite")
1718

1819
# Test runner infrastructure for Flang. This configures the Flang test trees
1920
# for use by Lit, and delegates to LLVM's lit test handlers.
@@ -41,6 +42,11 @@ if(FLANG_TEST_USE_VG)
4142
set(FLANG_TEST_EXTRA_ARGS ${FLANG_TEST_EXTRA_ARGS} "--vg")
4243
endif ()
4344

45+
option(FLANG_TEST_VERBOSE_MODE "Run Flang tests in verbose mode" OFF)
46+
if(FLANG_TEST_VERBOSE_MODE)
47+
set(FLANG_TEST_EXTRA_ARGS ${FLANG_TEST_EXTRA_ARGS} "-vv --debug")
48+
endif ()
49+
4450
set(FLANG_TEST_PARAMS
4551
flang_site_config=${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg
4652
)

test/lit.cfg

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ import tempfile
2626
import lit.formats
2727
import lit.util
2828

29-
if platform.system() == 'Windows':
30-
lit_config.note('We do not support Windows, but hey, congratulations on porting to Windows!')
31-
raise SystemExit
32-
3329
# Configuration file for the 'lit' test runner.
3430

3531
# name: The name of this test suite.
@@ -44,7 +40,7 @@ if use_lit_shell:
4440
else:
4541
# Otherwise we default to internal on Windows and external elsewhere, as
4642
# bash on Windows is usually very slow.
47-
execute_external = (not sys.platform in ['win32'])
43+
execute_external = True #(not sys.platform in ['win32'])
4844

4945
# testFormat: The test format to use to interpret tests.
5046
#

0 commit comments

Comments
 (0)