Re: [PATCH igt v2] igt/tools_test: Check the tools exist before executing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux