64bit arches and tests

Simon Marlow simonmar at microsoft.com
Mon Nov 8 05:31:28 EST 2004


You need to 'make boot' in testsuite/ to generate wordsize.mk.

Cheers,
	Simon

On 08 November 2004 07:05, Ralf Laemmel wrote:

> This patch back from July does not seem to work smoothly.
> I just have built GHC from CVS (as I do every now and then).
> The built works fine.
> Running gmake in some testsuite directory gives the following result.
> 
> [ralf at localhost Generics]$ pwd
>
/home/ralf/cvs/software/ghc-fptools/testsuite/tests/ghc-regress/lib/Gene
rics
> [ralf at localhost Generics]$ gmake
> ../../../../mk/test.mk:18: ../../../../mk/wordsize.mk: No such file or
> directory
> gmake: *** Warning: File `Makefile' has modification time in the
> future (2004-11-07 23:24:45 > 2004-11-07 23:12:48.82703)
> gmake: *** No rule to make target `../../../../mk/wordsize.mk'.  Stop.
> [ralf at localhost Generics]$
> 
> It turns out that there is a file wordsize.mk.in but not a file
> wordsize.mk. So is configure/autoreconf perhaps missing something?
> 
> (I can run the testsuite when I remove the offending include from
> test.mk.) 
> 
> Regards,
> Ralf
> 
> 
> Ian Lynagh wrote:
> 
>> Hi Simon,
>> 
>> I've attached a patch that allows you to give a -ws-64 stdout variant
>> rather than requiring each 64-bit platform to have a -platform one.
>> 
>> It also modifies enum001, partly to alter spacing but also to inline
>> printTest where things like \NUL are used, as modern cpp behaves
>> differently.
>> 
>> Finally, I've also renamed the generated .script files to .genscript
>> to 
>> make it easier to clean a testsuite tree.
>> 
>> I haven't included the -ws-64 files in the patch as they are quite
>> large, but I can check them in or stick them on the web if this
>> looks OK 
>> to you.
>> 
>> 
>> Incidentally, is it expected that an amd64 GHC compiled with
>> 
>> GhcUnregisterised=YES
>> SplitObjs=NO
>> 
>> in mk/build.mk should fail fed001, ffi006 - ffi011 with the
>> following? 
>> 
>> fed001: internal error: adjustor creation not supported on this
>>    platform Please report this as a bug to
>>    glasgow-haskell-bugs at haskell.org, or
>> http://www.sourceforge.net/projects/ghc/ 
>> 
>> 
>> Thanks
>> Ian
>> 
>> 
>> 
>>
------------------------------------------------------------------------
>> 
>> diff -Nur ghc-cvs-20040711.orig/testsuite/Makefile
>> ghc-cvs-20040711/testsuite/Makefile ---
>> ghc-cvs-20040711.orig/testsuite/Makefile	2002-08-29
>> 10:22:13.000000000 +0000 +++
>> ghc-cvs-20040711/testsuite/Makefile	2004-08-01 05:03:30.000000000
>> +0000 @@ -1,9 +1,14 @@   
>> TOP = .
>> include $(TOP)/mk/boilerplate.mk
>> 
>> -all boot ::
>> +CLEAN_FILES += mk/wordsize.mk
>> +
>> +all ::
>> 	@echo "To run the tests, go into tests/ghc-regress and say
\`make'."
>> 	@echo "More information about configuring and running the
testsuite"
>> 	@echo "can be found in the file \`README' in this directory."
>> 
>> +boot ::
>> +	$(CPP) $(RAWCPP_FLAGS) -x c mk/wordsize.mk.in > mk/wordsize.mk +
>> include $(TOP)/mk/target.mk
>> diff -Nur ghc-cvs-20040711.orig/testsuite/driver/testlib.py
>> ghc-cvs-20040711/testsuite/driver/testlib.py ---
>> ghc-cvs-20040711.orig/testsuite/driver/testlib.py	2004-03-16
>>         10:27:18.000000000 +0000 +++
>>         ghc-cvs-20040711/testsuite/driver/testlib.py	2004-08-01
>> 04:45:43.000000000 +0000 @@ -41,6 +41,9 @@ # What platform are we
>> running on? self.platform = ''  
>> 
>> +        # What is the wordsize (in bits) of this platform? +       
>> self.wordsize = '' +
>>         # Verbosity level
>>         self.verbose = 1
>> 
>> @@ -415,7 +418,7 @@
>>     # of whether we expected the compilation to fail or not
>>     (successful # compilations may generate warnings).
>> 
>> -    expected_stderr_file = platform_qualify(name, 'stderr')
>> +    expected_stderr_file = platform_wordsize_qualify(name, 'stderr')
>>     actual_stderr_file = qualify(name, 'comp.stderr')
>>     actual_stderr = normalise_errmsg(open(actual_stderr_file).read())
>> 
>> @@ -575,7 +578,7 @@
>>     else:
>>         srcname = top_mod
>> 
>> -    scriptname = add_suffix(name, 'script')
>> +    scriptname = add_suffix(name, 'genscript')
>>     qscriptname = in_testdir(scriptname)
>>     rm_no_fail(qscriptname)
>> 
>> @@ -753,7 +756,7 @@
>> 
>> def check_stdout_ok( name ):
>>    actual_stdout_file   = qualify(name, 'run.stdout')
>> -   expected_stdout_file = platform_qualify(name, 'stdout')
>> +   expected_stdout_file = platform_wordsize_qualify(name, 'stdout')
>> 
>>    if os.path.exists(expected_stdout_file):
>>        expected_stdout = open(expected_stdout_file).read() @@ -778,7
>> +781,7 @@ 
>> 
>> def check_stderr_ok( name ):
>>    actual_stderr_file   = qualify(name, 'run.stderr')
>> -   expected_stderr_file = platform_qualify(name, 'stderr')
>> +   expected_stderr_file = platform_wordsize_qualify(name, 'stderr')
>> 
>>    if os.path.exists(expected_stderr_file):
>>        expected_stderr = open(expected_stderr_file).read() @@
>> -883,12 +886,16 @@ 
>> def qualify( name, suff ):
>>     return in_testdir(add_suffix(name, suff))
>> 
>> -# "foo" -> qualify("foo-platform") if it exists, or qualify("foo")
>> otherwise 
>> -def platform_qualify( name, suff ):
>> +# "foo" -> qualify("foo-platform") if it exists, otherwise
>> +# try qualify("foo-ws-wordsize") or finally qualify("foo")
>> +def platform_wordsize_qualify( name, suff ):
>>     path = qualify(name, suff)
>>     platform_path = path + '-' + config.platform
>> +    wordsize_path = path + '-ws-' + config.wordsize
>>     if os.path.exists(platform_path):
>>         return platform_path
>> +    elif os.path.exists(wordsize_path):
>> +        return wordsize_path
>>     else:
>>         return path
>> 
>> diff -Nur ghc-cvs-20040711.orig/testsuite/mk/test.mk
>> ghc-cvs-20040711/testsuite/mk/test.mk ---
>> ghc-cvs-20040711.orig/testsuite/mk/test.mk	2004-03-01
>> 13:27:28.000000000 +0000 +++
>> ghc-cvs-20040711/testsuite/mk/test.mk	2004-08-01
00:40:21.000000000
>> +0000 @@ -15,6 +15,8 @@ # #
>>
------------------------------------------------------------------------
-----
>> 
>> +include $(TOP)/mk/wordsize.mk
>> +
>> ifeq "$(PYTHON)" ""
>> $(error Python must be installed in order to use the testsuite)
>> endif
>> @@ -64,6 +66,7 @@
>> 	-e config.compiler=\"$(TEST_HC)\" \
>> 	-e config.compiler_always_flags.append"(\"$(EXTRA_HC_OPTS)\")" \
>> 	-e config.platform=\"$(TARGETPLATFORM)\" \
>> +	-e config.wordsize=\"$(WORDSIZE)\" \
>> 	$(EXTRA_RUNTEST_OPTS)
>> 
>> TESTS	     =
>> diff -Nur ghc-cvs-20040711.orig/testsuite/mk/wordsize.mk.in
>> ghc-cvs-20040711/testsuite/mk/wordsize.mk.in ---
>> ghc-cvs-20040711.orig/testsuite/mk/wordsize.mk.in	1970-01-01
>> 00:00:00.000000000 +0000 +++
>> ghc-cvs-20040711/testsuite/mk/wordsize.mk.in	2004-08-01
>> 00:09:01.000000000 +0000 @@ -0,0 +1,5 @@ + +#include
>> "../../ghc/includes/MachDeps.h" + +WORDSIZE = WORD_SIZE_IN_BITS
>> +
>> diff -Nur
>>
ghc-cvs-20040711.orig/testsuite/tests/ghc-regress/lib/should_run/enum01.
hs
>> ghc-cvs-20040711/testsuite/tests/ghc-regress/lib/should_run/enum01.hs
>>   ---
>>
ghc-cvs-20040711.orig/testsuite/tests/ghc-regress/lib/should_run/enum01.
hs	2004-03-10
>> 11:37:03.000000000 +0000 +++
>> ghc-cvs-20040711/testsuite/tests/ghc-regress/lib/should_run/enum01.hs
2004-07-31
>> 21:03:17.000000000 +0000 @@ -161,8 +161,10 @@ printTest ((map
>> fromEnum ['X',minBound,maxBound]))     
>> 
>>      -- [x..] aka enumFrom
>> -  printTest ((take 7 ['\NUL' .. ]))
>> -  printTest ((take 7 ['\250' .. ]))
>> +  -- printTest ((take 7 ['\NUL' .. ]))
>> +  do{ putStr ( "    " ++ "(take 7 ['\\NUL' .. ])" ++ " = " ) ;
>> print (take 7 ['\NUL' .. ]) } +  -- printTest ((take 7 ['\250' .. ]))
>> +  do{ putStr ( "    " ++ "(take 7 ['\\250' .. ])" ++ " = " ) ;
>> print (take 7 ['\250' .. ]) } 
>> 
>>      -- [x,y..] aka enumFromThen
>>   printTest ((take 7 ['a','b'..]))
>> @@ -171,19 +173,24 @@
>>   printTest ((take 7 ['z','y'..]))
>>   printTest ((take 7 ['z','v'..]))
>>   let x = '\1'
>> -  printTest ((take 7 ['\1', '\0' ..]))
>> +  -- printTest ((take 7 ['\1', '\0' ..]))
>> +  do{ putStr ( "    " ++ "(take 7 ['\\1', '\\0' ..])" ++ " = " ) ;
>> print (take 7 ['\1', '\0' ..]) }   let x = '\5' -  printTest ((take
>> 7 ['\5', '\4' ..])) +  -- printTest ((take 7 ['\5', '\4' ..]))
>> +  do{ putStr ( "    " ++ "(take 7 ['\\5', '\\4' ..])" ++ " = " ) ;
>> print (take 7 ['\5', '\4' ..]) }   let x = (maxBound::Int) - 5 - 
>> printTest ((take 7 ['\250', '\251' ..])) +  -- printTest ((take 7
>> ['\250', '\251' ..])) +  do{ putStr ( "    " ++ "(take 7 ['\\250',
>> '\\251' ..])" ++ " = " ) ; print (take 7 ['\250', '\251' ..]) } 
>> 
>>      -- [x..y] aka enumFromTo
>>   printTest ((take 7 (['a' .. 'e'])))
>>   printTest ((take 4 (['a' .. 'a'])))
>>   printTest ((take 7 (['b' .. 'a'])))
>>   printTest ((take 7 (['e' .. 'a'])))
>> -  printTest ((take 7 (['\250' .. '\255'])))
>> -  printTest ((take 7 (['\5' .. '\0'])))
>> +  -- printTest ((take 7 (['\250' .. '\255'])))
>> +  do{ putStr ( "    " ++ "(take 7 (['\\250' .. '\\255']))" ++ " = "
>> ) ; print (take 7 (['\250' .. '\255'])) } +  -- printTest ((take 7
>> (['\5' .. '\0']))) +  do{ putStr ( "    " ++ "(take 7 (['\\5' ..
>> '\\0']))" ++ " = " ) ; print (take 7 (['\5' .. '\0'])) } 
>> 
>>      -- [x,y..z] aka enumFromThenTo
>>   printTest ((take 7 ['f','e' .. 'b']))
>> @@ -193,8 +200,10 @@
>>   printTest ((take 7 ['c','b' .. 'c']))
>>   printTest ((take 7 ['c','b' .. 'b']))
>>   printTest ((take 7 ['c','d' .. 'b']))
>> -  printTest ((take 7 ['\251', '\252' .. maxBound]))
>> -  printTest ((take 7 ['\5', '\4' .. minBound]))
>> +  -- printTest ((take 7 ['\251', '\252' .. maxBound]))
>> +  do{ putStr ( "    " ++ "(take 7 ['\\251', '\\252' .. maxBound])"
>> ++ " = " ) ; print (take 7 ['\251', '\252' .. maxBound]) } +  --
>> printTest ((take 7 ['\5', '\4' .. minBound])) +  do{ putStr ( "    "
>> ++ "(take 7 ['\\5', '\\4' .. minBound])" ++ " = " ) ; print (take 7
>> ['\5', '\4' .. minBound]) }  
>> 
>> 
>> testEnumUnit :: IO ()
>> @@ -323,8 +332,8 @@
>>   printTest (take 7 ([False,True .. True]))
>>   printTest (take 7 ([True,False .. False]))
>>   printTest (take 7 ([True,False .. True]))
>> -  printTest (take 7 ([True,True ..  False]))
>> -  printTest (take 7 ([True,True ..  True]))
>> +  printTest (take 7 ([True,True .. False]))
>> +  printTest (take 7 ([True,True .. True]))
>> 
>> 
>> testEnumInteger :: IO ()
>> 
>> 
>>
------------------------------------------------------------------------
>> 
>> _______________________________________________
>> Cvs-ghc mailing list
>> Cvs-ghc at haskell.org
>> http://www.haskell.org/mailman/listinfo/cvs-ghc



More information about the Cvs-ghc mailing list