Changeset 692
- Timestamp:
- 07/23/07 12:34:39 (1 year ago)
- Files:
-
- trunk/docs/ChangeLog (modified) (1 diff)
- trunk/dsss.conf (modified) (1 diff)
- trunk/sss/build.d (modified) (3 diffs)
- trunk/sss/clean.d (modified) (2 diffs)
- trunk/sss/conf.d (modified) (4 diffs)
- trunk/sss/dsss_lib_test.d (added)
- trunk/sss/main.d (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/docs/ChangeLog
r685 r692 1 SVN from 0.68: 2 - Added --test option to test built libraries. 3 1 4 0.68 from 0.67: 2 5 - Rebuild: -of<name> now converts / to \ on Windows (see ticket #85). trunk/dsss.conf
r600 r692 29 29 # Install this as a sourcelibrary, so it will work on any platform/compiler combination 30 30 type = sourcelibrary 31 exclude = sss/dsss_lib_test.d sss/dsssdll.d sss/main.d sss/stub.d 32 buildflags = -Irebuild 33 34 # dsss_lib_test is special, so put it in share/ 35 postinstall = install sss/dsss_lib_test.d $PREFIX/share/dsss 31 36 32 37 version (Windows) { trunk/sss/build.d
r642 r692 234 234 // if we should, build the library 235 235 if ((type == "library" && libsSafe()) || 236 doDocs /* need to build the library to get docs */ ) { 236 doDocs /* need to build the library to get docs */ || 237 testLibs /* need to build the ilbrary to test it */) { 237 238 238 239 if (targetGNUOrPosix()) { … … 241 242 char[] stbl = bl ~ docbl ~ bflags ~ " -explicit -lib -full " ~ fileList ~ " -oflibS" ~ target ~ ".a"; 242 243 saySystemRDie(stbl, "-rf", target ~ "_static.rf", deleteRFiles); 244 245 // perhaps test the static library 246 if (testLibs) { 247 writefln("Testing %s", target); 248 char[] tbl = bl ~ bflags ~ " -unittest -full " ~ fileList ~ " " ~ dsssLibTestDPrefix ~ " -oftest_" ~ target; 249 saySystemRDie(tbl, "-rf", target ~ "_test.rf", deleteRFiles); 250 saySystemDie("./test_" ~ target); 251 } 243 252 244 253 if (shLibSupport() && … … 258 267 char[] stbl = bl ~ docbl ~ bflags ~ " -explicit -lib -full " ~ fileList ~ " -ofS" ~ target ~ ".lib"; 259 268 saySystemRDie(stbl, "-rf", target ~ "_static.rf", deleteRFiles); 269 270 // perhaps test the static library 271 if (testLibs) { 272 writefln("Testing %s", target); 273 char[] tbl = bl ~ bflags ~ " -unittest -full " ~ fileList ~ " " ~ dsssLibTestDPrefix ~ " -oftest_" ~ target ~ ".exe"; 274 saySystemRDie(tbl, "-rf", target ~ "_test.rf", deleteRFiles); 275 saySystemDie("test_" ~ target ~ ".exe"); 276 } 277 260 278 } else { 261 279 assert(0); trunk/sss/clean.d
r653 r692 106 106 // first remove the static library 107 107 tryRemove("libS" ~ target ~ ".a"); 108 109 // then any testing binary 110 tryRemove("test_" ~ target); 108 111 109 112 // then remove the shared libraries … … 119 122 // first remove the static library 120 123 tryRemove("S" ~ target ~ ".lib"); 124 125 // then any testing binary 126 tryRemove("test_" ~ target); 121 127 122 128 // then remove the shared libraries trunk/sss/conf.d
r682 r692 109 109 char[] candyDocPrefix; 110 110 111 /** The location of dsss_lib_test.d */ 112 char[] dsssLibTestDPrefix; 113 111 114 /** Are we doing documentation? */ 112 115 bool doDocs = false; … … 114 117 /** Should we delete response files? */ 115 118 bool deleteRFiles = true; 119 120 /** Should we generate test binaries? */ 121 bool testLibs = false; 116 122 117 123 /** The prefix for scratch work */ … … 196 202 installPrefix ~ std.path.sep ~ 197 203 "candydoc.tar.gz"); 204 if (!dsssLibTestDPrefix.length) 205 dsssLibTestDPrefix = canonPath( 206 installPrefix ~ std.path.sep ~ 207 "sss" ~ std.path.sep ~ 208 "dsss_lib_test.d"); 198 209 } else { 199 210 inSourceDir = false; … … 258 269 "dsss" ~ std.path.sep ~ 259 270 "candydoc.tar.gz"); 271 if (!dsssLibTestDPrefix.length) 272 dsssLibTestDPrefix = canonPath( 273 installPrefix ~ std.path.sep ~ 274 ".." ~ std.path.sep ~ 275 "share" ~ std.path.sep ~ 276 "dsss" ~ std.path.sep ~ 277 "dsss_lib_test.d"); 260 278 } 261 279 trunk/sss/main.d
r685 r692 206 206 arg[0] == '-') { 207 207 // perhaps specific to a command 208 if (command == cmd_t.NET) { 208 if (command == cmd_t.BUILD) { 209 if (parseArg(arg, "test", false)) { 210 testLibs = true; 211 } else { 212 dsss_buildOptions ~= arg ~ " "; 213 } 214 215 } else if (command == cmd_t.NET) { 209 216 if (parseArg(arg, "source", true, &val)) { 210 217 forceMirror = val; … … 315 322 } else if (command == cmd_t.BUILD) { 316 323 writefln( 317 `Usage: dsss [dsss options] build [build options] [sources, binaries or packages]` 324 `Usage: dsss [dsss options] build [build options] [sources, binaries or packages] 325 Build options: 326 --test: test compiled libraries` 318 327 ); 319 328 … … 346 355 writefln( 347 356 `Usage: dsss [dsss options] net <net command> [options] <package name> 348 Net Commands:357 Net commands: 349 358 deps: install (from the network source) dependencies of the present 350 359 package
