[Intel-gfx] [PATCH igt v2] igt/tools_test: Check the tools exist before executing
Chris Wilson
chris at chris-wilson.co.uk
Thu Dec 14 11:24:20 UTC 2017
Quoting Petri Latvala (2017-12-14 11:20:18)
> On Thu, Dec 14, 2017 at 11:14:35AM +0000, Chris Wilson wrote:
> > >
> > > Why the chdir?
> >
> > For me, I was trying to standardise the test, since "../tools" bakes in
> > so many assumptions that simply aren't true when one invokes
> > $path/tools_test. Back to the igt_data_dir() request.
>
> Aye, the assumption is bad and should get changed to support both run
> methods (within build dir, with installed). Currently it works by
> carefully setting up the CI deployment so paths match. =(
>
> >
> > > CI runs tests with IGT installed (make install). The test's directory
> > > is $libexecdir/intel-gpu-tools/, ../tools is $libexecdir/tools and
> > > that doesn't exist.
> >
> > So where was it expecting to find the tools?
>
>
> CI deploys the tools next to piglit. $cwd is piglit's directory when
> running through piglit, tools are deployed to $piglit/../tools.
How about
if (access("../tools/", F_OK)) {
chdir();
}
Got to love temporary hacks.
-Chris
More information about the Intel-gfx
mailing list