Re: [PATCH] PR bootstrap/71481: fix input.c selftest

2016-06-13 Thread Jeff Law
On 06/09/2016 03:58 PM, David Malcolm wrote: input.c's selftest::test_reading_source_line attempted to read from __FILE__, which doesn't work if the binary is run from a different location than the build dir. Fix it by rewriting the test to write out a tempfile, and read from that, rather than

Re: [PATCH] PR bootstrap/71481: fix input.c selftest

2016-06-10 Thread Richard Biener
On Thu, Jun 9, 2016 at 11:58 PM, David Malcolm wrote: > input.c's selftest::test_reading_source_line attempted to read from > __FILE__, which doesn't work if the binary is run from a different > location than the build dir. > > Fix it by rewriting the test to write out a

[PATCH] PR bootstrap/71481: fix input.c selftest

2016-06-09 Thread David Malcolm
input.c's selftest::test_reading_source_line attempted to read from __FILE__, which doesn't work if the binary is run from a different location than the build dir. Fix it by rewriting the test to write out a tempfile, and read from that, rather than from __FILE__. I used make_temp_file to create