Changeset 105445 in webkit


Ignore:
Timestamp:
Jan 19, 2012 2:04:55 PM (12 years ago)
Author:
ap@apple.com
Message:

make-new-script-test should work with HTTP tests
https://bugs.webkit.org/show_bug.cgi?id=76603

Reviewed by Adam Roben.

  • Scripts/make-new-script-test:

(makePathToSharedSources): Renamed from makeTestRelativePathToSharedSources(), since it
now also creates absolute paths for HTTP.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r105443 r105445  
     12012-01-19  Alexey Proskuryakov  <ap@apple.com>
     2
     3        make-new-script-test should work with HTTP tests
     4        https://bugs.webkit.org/show_bug.cgi?id=76603
     5
     6        Reviewed by Adam Roben.
     7
     8        * Scripts/make-new-script-test:
     9        (makePathToSharedSources): Renamed from makeTestRelativePathToSharedSources(), since it
     10        now also creates absolute paths for HTTP.
     11
    1122012-01-19  Ryosuke Niwa  <rniwa@webkit.org>
    213
  • trunk/Tools/Scripts/make-new-script-test

    r99220 r105445  
    3535use webkitdirs;
    3636
    37 sub makeTestRelativePathToSharedSources;
     37sub makePathToSharedSources;
    3838sub openTestInEditor;
    3939sub writeTestFile;
     
    7373exit 0;
    7474
    75 sub makeTestRelativePathToSharedSources
     75sub makePathToSharedSources
    7676{
    7777    my $layoutTestsPath = getcwd();
    7878    $testAbsolutePath =~ m/^$layoutTestsPath/ or die "Path $testAbsolutePath is not in LayoutTests directory.\n";
    79     my $result = File::Spec->abs2rel("fast/js/resources/", dirname($testAbsolutePath));
    80     return $result;
     79    my $isHTTPTest = $testAbsolutePath =~ m/^$layoutTestsPath\/http/;
     80    if ($isHTTPTest) {
     81        return "/js-test-resources";
     82    } else {
     83        return File::Spec->abs2rel("fast/js/resources/", dirname($testAbsolutePath));
     84    }
    8185}
    8286
     
    8589    die "Test $testAbsolutePath already exists.\n" if (-e $testAbsolutePath);
    8690
    87     my $relativePathToSharedSources = makeTestRelativePathToSharedSources();
     91    my $pathToSharedSources = makePathToSharedSources();
    8892
    8993    open TEST, ">", ${testAbsolutePath} or die "Cannot create test file at $testAbsolutePath.\n";
     
    9397<head>
    9498<meta charset="utf-8">
    95 <script src="$relativePathToSharedSources/js-test-pre.js"></script>
     99<script src="$pathToSharedSources/js-test-pre.js"></script>
    96100</head>
    97101<body>
     
    103107
    104108</script>
    105 <script src="$relativePathToSharedSources/js-test-post.js"></script>
     109<script src="$pathToSharedSources/js-test-post.js"></script>
    106110</body>
    107111</html>
Note: See TracChangeset for help on using the changeset viewer.