6 # Get the path for webkit-efl source.
7 $sourcePath = abs_path(dirname(dirname($0)));
8 unless (-d $sourcePath) {
9 die "webkit-efl sources couldn't be found at: ", $sourcePath, "\n";
12 # Get the tests patch.
13 $testsPath = $sourcePath . "/Source/WebKit2/UIProcess/API/efl/tests/";
14 unless (-d $testsPath) {
15 die "The test directory couldn't be found at: ", $testsPath, "\n";
18 # Set an environment variable with resources path.
19 $ENV{TEST_RESOURCES_DIR} = $testsPath . "resources/";
20 unless (-d $ENV{TEST_RESOURCES_DIR}) {
21 die "The resources directory couldn't be found at: ", $ENV{TEST_RESOURCES_DIR}, "\n";
24 # Determine the build directory.
25 $buildPath = $sourcePath . "/WebKitBuild/Release/";
26 unless (-d $buildPath) {
27 die "The build directory couldn't be found at: ", $buildPath, "\n";
30 # Set LD_LIBRARY_PATH environment variable to find gtest library and newly built webkit engine
31 $ENV{LD_LIBRARY_PATH} = $buildPath . "lib/";
32 unless (-d $ENV{LD_LIBRARY_PATH}) {
33 die "The library path couldn't be found at: ", $ENV{LD_LIBRARY_PATH}, "\n";
36 $binDir = $buildPath . "bin/";
38 die "The directory with binaries couldn't be found at: ", $binDir, "\n";
41 # Run the tests from the command line (if any).
43 foreach $testName(@ARGV) {
47 opendir(DIR, $binDir);
48 while (my $testName = readdir(DIR)) {
49 next unless ($testName =~ m/^test_ewk2_/);
51 system($binDir . $testName);