[flang] Prevent .mod files from being left by tests
authorTim Keith <tkeith@nvidia.com>
Wed, 19 Jun 2019 20:18:17 +0000 (13:18 -0700)
committerTim Keith <tkeith@nvidia.com>
Wed, 19 Jun 2019 20:18:17 +0000 (13:18 -0700)
commite9920a6861b5257f0f24e5092d6f3f1ea1493916
tree8106081378bd5b1c919cfeb2562b921dcc964918
parent73644db8aa2673150f5433e35e1965c3aeaa6004
[flang] Prevent .mod files from being left by tests

test_symbols.sh and test_folding.sh were running the compiler in the
test directory (e.g. `<build>/test/semantics`). This meant that .mod
files were being left there because they weren't cleaned up.

Change to run the compiler in the temp directory created for each test.
It is deleted at the end so files aren't left behind.

Original-commit: flang-compiler/f18@4f9735ada7b142e7a013bede4a3d258b6620a573
Reviewed-on: https://github.com/flang-compiler/f18/pull/506
flang/test/evaluate/test_folding.sh
flang/test/semantics/test_symbols.sh