#!/bin/bash # # Any copyright is dedicated to the Public Domain. # http://creativecommons.org/publicdomain/zero/1.0/ # # Script to generate XUL reftest files, from corresponding reftest # files that use . # # This script expects to be run from this working directory: # mozilla-central/layout/reftests/w3c-css/submitted/images3 # and it expects to be run *after* generate-object-fit-xul-tests.sh, since the # copied test files will make use of image resources which are copied by that # other script. XUL_REFTEST_PATH="../../../xul" reftestListFileName="$XUL_REFTEST_PATH/reftest.list" # Loop across all object-position tests that use ("i" suffix): for origTestName in object-position-png-*i.html; do newTestName=$(echo $origTestName | sed "s/i.html/.xul/") # Find the corresponding reference case: referenceName=$(echo $origTestName | sed "s/i.html/-ref.html/") # Generate reference file (dropping "support" subdir from image paths): echo "Copying $referenceName to $XUL_REFTEST_PATH." newReferenceFullPath=$XUL_REFTEST_PATH/$referenceName hg cp $referenceName $newReferenceFullPath sed -i "s,support/,," $newReferenceFullPath # Generate testcase # (converting