11949 make -C caches wrong directory contents

Review Request #2447 — Created Nov. 9, 2019 and submitted

citrus
illumos-gate
master
11949
c366f8c...
general
rm
11949 make -C caches wrong directory contents

Running the tests introduced with this change shows all passes (versus mostly failures before):

PASS make -C a/ from empty directory
PASS make -C a/ from non-empty directory
PASS makeflags -C a/ from empty directory
PASS makeflags -C a/ from non-empty directory
PASS make -C a/a from empty directory
PASS make -C a/a from non-empty directory
PASS makeflags -C a/a from empty directory
PASS makeflags -C a/a from non-empty directory
PASS make -C a/b from empty directory
PASS make -C a/b from non-empty directory
PASS makeflags -C a/b from empty directory
PASS makeflags -C a/b from non-empty directory
PASS make -C a/c from empty directory
PASS make -C a/c from non-empty directory
PASS makeflags -C a/c from empty directory
PASS makeflags -C a/c from non-empty directory
PASS make -C -C from empty directory
PASS make -C -C from non-empty directory
PASS makeflags -C -C from empty directory
PASS makeflags -C -C from non-empty directory
PASS make -C -C relative from empty directory
PASS make -C error
PASS make -C error (output)
PASS MAKEFLAGS=-C error
PASS MAKEFLAGS=-C error (output)
PASS make -C <noexist>
PASS make -C <noexist> (output)
PASS MAKEFLAGS=-C <noexist>
PASS MAKEFLAGS=-C <noexist> (output)
  • 0
  • 0
  • 3
  • 1
  • 4
Description From Last Updated
citrus
rm
  1. It looks like a stray .gitignore file was also introduced in this, but I can't comment on that file.

    Thanks for adding a small test suite here.

    1. It's a pretty standard way of making git remember the otherwise empty directory, but I'll move it to a README instead.

      I added it to the tree instead of just in proto so that it is possible to run the tests from a checked out tree with
      FILEDIR=$(pwd)/files ./make_test.sh

    2. OK. It was pretty unclear to me that is what it was for. If it's going to be that way, having a comment that indicates in the file rather than nothing would be helpful, since folks will probably miss that fact pretty easily.

  2. illumos shell style prefers [[ for tests. Only mentioning it here.

  3. Is this just for a user who wants to get more output?

    1. Yes (if was useful for me when developing the tests). I can drop it in the final version if you prefer.

    2. Ideally we'd have enough output on test failure to figure out what went wrong and not have to rerun it. So printing that information on test failure seems worthwhile still? As all the test results are logged when invoked via the test runner.

    3. Done - and I've dropped the empty directory too. It will still be created in proto

  4. 
      
citrus
citrus
rm
  1. 
      
  2. If we can't create the test directory, shouldn't we stop execution of this function?

  3. If we can't create the test directory, shouldn't we stop execution of this function?

  4. 
      
citrus
rm
  1. Ship It!
  2. 
      
citrus
Review request changed

Status: Closed (submitted)

Loading...