[LLVMdev] LLVM on Cygwin: why tests don't run

NAKAMURA Takumi geek4civic at gmail.com
Fri Dec 24 00:32:42 PST 2010


Good evening, Csaba!

I think rather, Cygwin does not need to know what PATHEXT would be.
A patch(0001) is attached.

Another patch is for unittests. Lit does not find *Tests.exe in
unittests on ToT.


2010/12/24 Csaba Raduly <rcsaba at gmail.com>:
> P.S.
> With the above change, "make check-all" starts to run. Estimated run
> time: 40 hours on my 1.8GHz single-core Centrino laptop. (The same
> machine running Linux completed "make check-all" in 2min 30 sec!)

me2. I don't know why too slow.
It seems executable files would not hit in disk cache.
FYI, try ;) (to warm cache)
$ (cd Release+Asserts; mkdir xxx; mv -v *.exe *.dll xxx; cp -v xxx/*
.; rm -rfv xxx)


...Takumi
-------------- next part --------------
From 006ce1d5056c8c1e786885dc00df58b9a39b8f20 Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi <geek4civic at gmail.com>
Date: Sat, 21 Aug 2010 18:10:13 +0900
Subject: [PATCH 1/5] lit/Util.py: On Cygwin, 'PATHEXT' may exist but it should not be used.

---
 utils/lit/lit/Util.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/utils/lit/lit/Util.py b/utils/lit/lit/Util.py
index 414b714..611b5bb 100644
--- a/utils/lit/lit/Util.py
+++ b/utils/lit/lit/Util.py
@@ -64,7 +64,11 @@ def which(command, paths = None):
         paths = os.defpath
 
     # Get suffixes to search.
-    pathext = os.environ.get('PATHEXT', '').split(os.pathsep)
+    # On Cygwin, 'PATHEXT' may exist but it should not be used.
+    if os.pathsep == ';':
+        pathext = os.environ.get('PATHEXT', '').split(';')
+    else:
+        pathext = ['']
 
     # Search the paths...
     for path in paths.split(os.pathsep):
-- 
1.7.1.GIT

-------------- next part --------------
From b02ee826b511f26dd99022d16aa3cceb80f79aec Mon Sep 17 00:00:00 2001
From: NAKAMURA Takumi <geek4civic at gmail.com>
Date: Tue, 24 Aug 2010 12:37:52 +0900
Subject: [PATCH 2/5] lit/TestFormats.py: Unittests may be found with suffix .exe also on Cygwin.

---
 utils/lit/lit/TestFormats.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/lit/lit/TestFormats.py b/utils/lit/lit/TestFormats.py
index 230995a..6dda2fd 100644
--- a/utils/lit/lit/TestFormats.py
+++ b/utils/lit/lit/TestFormats.py
@@ -1,11 +1,11 @@
 import os
-import platform
+import sys
 
 import Test
 import TestRunner
 import Util
 
-kIsWindows = platform.system() == 'Windows'
+kIsWindows = sys.platform in ['win32', 'cygwin']
 
 class GoogleTest(object):
     def __init__(self, test_sub_dir, test_suffix):
-- 
1.7.1.GIT



More information about the llvm-dev mailing list