summaryrefslogtreecommitdiff
path: root/testsuite/timeout
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-07-07 21:35:42 +0000
committerIan Lynagh <igloo@earth.li>2007-07-07 21:35:42 +0000
commit254f218683e48008700f35e80e665ae9b8d50b95 (patch)
treedc00785dfd0b231d93ae06ac593adeb35a995f14 /testsuite/timeout
parenta3600a39a53effb59fe37f727358095c8783b6ef (diff)
downloadhaskell-254f218683e48008700f35e80e665ae9b8d50b95.tar.gz
Fix calibrate python script for non-UNIX machines
Diffstat (limited to 'testsuite/timeout')
-rw-r--r--testsuite/timeout/calibrate9
1 files changed, 8 insertions, 1 deletions
diff --git a/testsuite/timeout/calibrate b/testsuite/timeout/calibrate
index 4ebd07ae7c..a18eb846c6 100644
--- a/testsuite/timeout/calibrate
+++ b/testsuite/timeout/calibrate
@@ -4,7 +4,14 @@ import math
import os
from os import *
from sys import *
-from resource import *
+try:
+ from resource import *
+except:
+ # We don't have resource, so this is a non-UNIX machine.
+ # It's probably a reasonable modern x86/x86_64 machines, so we'd
+ # probably calibrate to 300 anyway; thus just print 300.
+ print 300
+ exit(0)
compiler = argv[1]
compiler_name = os.path.basename(compiler)