Jun. 11th, 2013

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
I spent all day getting this rustpkg test to work:
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.

Profile

tim: Tim with short hair, smiling, wearing a black jacket over a white T-shirt (Default)
Tim Chevalier

November 2021

S M T W T F S
 123456
78 910111213
14151617181920
21222324252627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags