TMI: 12 tests down, 11 to go
Jun. 11th, 2013 05:02 pmI spent all day getting this rustpkg test to work:
(create_local_package_with_dep, command_line_test, datestamp, are touch_source_file are all functions I had to write as part of the source file.)
It works now! Trivially, because rustpkg always rebuilds everything -- it doesn't do the thing that's the point of make yet, of rebuilding files only when their dependencies change. So if everything else works right, the timestamps will always change. Getting everything else to work right was what took all day. The details are too boring for even me to write about; lots of wrangling with file paths.
I also worked a tiny bit more on my OS Bridge slides, but I need to put some serious time into that before Practice Talk 2: Electric Boogaloo on Monday.
fn do_rebuild_dep_dates_change() { let workspace = create_local_package_with_dep("foo", "bar", &NoVersion); command_line_test("rustpkg", [~"build", ~"foo"], &workspace); let bar_date = datestamp(&lib_output_file_name(&workspace, "build", "bar")); touch_source_file(&workspace, "bar"); command_line_test("rustpkg", [~"build", ~"foo"], &workspace); let new_bar_date = datestamp(&lib_output_file_name(&workspace, "build", "bar")); assert!(new_bar_date > bar_date); }
(create_local_package_with_dep, command_line_test, datestamp, are touch_source_file are all functions I had to write as part of the source file.)
It works now! Trivially, because rustpkg always rebuilds everything -- it doesn't do the thing that's the point of make yet, of rebuilding files only when their dependencies change. So if everything else works right, the timestamps will always change. Getting everything else to work right was what took all day. The details are too boring for even me to write about; lots of wrangling with file paths.
I also worked a tiny bit more on my OS Bridge slides, but I need to put some serious time into that before Practice Talk 2: Electric Boogaloo on Monday.