Re: Broken link to image while running test

On Nov 25, 2015, at 5:57 AM, Manuel Rego Casasnovas <rego@igalia.com> wrote:

> Hi,
> 
> in the CSS Grid Layout spec I've created this test:
> https://github.com/w3c/csswg-test/blob/master/css-grid-1/grid-items/grid-minimun-size-grid-items-006.xht
> 
> Note that the test is under "css-grid-1/grid-items/" folder. We've
> different folders for each section of the spec.
> 
> The test use an image that is under "css-grid-1/support/" referencing it
> with:
> 	<img src="../support/100x100-green.png" />
> 
> The test works fine in Shepherd:
> http://test.csswg.org/shepherd/testcase/grid-minimun-size-grid-items-005/spec/css-grid-1/
> 
> However when I try to run it the link to the image is broken:
> http://test.csswg.org/harness/test/css-grid-1_dev/alpha/grid-minimun-size-grid-items-005/
> 
> I see that the test is run in this URL:
> http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/html/grid-minimun-size-grid-items-005.htm
> 
> So "../support/100x100-green.png" is trying to access:
> http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/support/100x100-green.png
> 
> Instead of:
> http://test.csswg.org/suites/css-grid-1_dev/nightly-unstable/html/support/100x100-green.png
> 
> What would be the right way to fix this?

The problem here is that the directory structures get rearranged during the test suite build, currently only reference links are getting fixed up.

For support files, you need to have them in a support directory in the same directory as the test, it's OK to have multiple copies of the same support files in the repository.

So:
mkdir css-grid-1/grid-items/support
hg copy css-grid-1/support/* css-grid-1/grid-items/support/

and then update the <img> to <img src="support/100x100-green.png" />

This will likely have to be done for the other directories under css-grid-1 as well.

Peter

Received on Wednesday, 25 November 2015 20:39:15 UTC