[M3devel] test p223 .so vs. .dylib in expected output
Jay K
jay.krell at cornell.edu
Thu Sep 20 22:49:35 CEST 2012
Olaf, here's an easy bug to understand that you introduced.It is a bug in the test code, not a bug otherewise.Think about how to fix it?I think in this case, we can just have expected-output.1, expected-output.2, expected-output.3, etc. as needed.The "check" code can enumerate and as long as the output matches any one of the expected outputs, pass.That is, even if Linux somehow accidentally outputs "dylib" or Darwin output "so", we'd claim success.There are "tighter" alternatives. You could have expected-output.Linux, expected-output.Darwin, expected-output.NT, expected-output.Solaris, expected-output.FreeBSD, but many of them are identical and it is unnecessary per-target work.Maybe expected-output-so and expected-output-dylib, and the checker can enumerate expected-output-*.
I don't think expected-output-I386_DARWIN, expected-output-I386_LINUX, etc. is the way to go, but it is an option. Too much repetition/bloat.
The test suite is handy btw. The C backend passes most of the tests already. :)
--- ../src/p2/p223/stdout.build 2009-12-15 03:04:02.000000000 -0800+++ ../src/p2/p223/I386_DARWIN/stdout.build 2012-09-20 13:44:54.000000000 -0700@@ -1,11 +1,13 @@ make_dir(PKG_INSTALL & "/p223/" & TARGET) install_file(".M3EXPORTS", PKG_INSTALL & "/p223/" & TARGET, "0664") make_dir(LIB_INSTALL)-install_file("liblib.so.5", LIB_INSTALL, "0775")+install_file("liblib.5.2.dylib", LIB_INSTALL, "0775") symbolic_link_file(PKG_INSTALL & "/p223/" & TARGET & "/liblib.a", LIB_INSTALL & "/liblib.a")-symbolic_link_file("liblib.so.5", LIB_INSTALL & "/liblib.so")-symbolic_link_file(LIB_INSTALL & "/liblib.so.5", PKG_INSTALL & "/p223/" & TARGET & "/liblib.so")-symbolic_link_file(LIB_INSTALL & "/liblib.so.5", PKG_INSTALL & "/p223/" & TARGET & "/liblib.so.5")+symbolic_link_file("liblib.5.2.dylib", LIB_INSTALL & "/liblib.dylib")+symbolic_link_file("liblib.5.2.dylib", LIB_INSTALL & "/liblib.5.dylib")+symbolic_link_file(LIB_INSTALL & "/liblib.5.2.dylib", PKG_INSTALL & "/p223/" & TARGET & "/liblib.dylib")+symbolic_link_file(LIB_INSTALL & "/liblib.5.2.dylib", PKG_INSTALL & "/p223/" & TARGET & "/liblib.5.dylib")+symbolic_link_file(LIB_INSTALL & "/liblib.5.2.dylib", PKG_INSTALL & "/p223/" & TARGET & "/liblib.5.2.dylib") install_file("liblib.a", PKG_INSTALL & "/p223/" & TARGET, "0664") install_file("liblib.m3x", PKG_INSTALL & "/p223/" & TARGET, "0664") install_file(".M3WEB", PKG_INSTALL & "/p223/" & TARGET, "0664")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120920/b8e5d425/attachment-0001.html>
More information about the M3devel
mailing list