Clear selection when back key is called from picker popup
[framework/web/webkit-efl.git] / TizenScripts / run-efl-tests
1 #!/usr/bin/perl
2
3 use File::Basename;
4 use Cwd 'abs_path';
5
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";
10 }
11
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";
16 }
17
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";
22 }
23
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";
28 }
29
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";
34 }
35
36 $binDir = $buildPath . "bin/";
37 unless (-d $binDir) {
38     die "The directory with binaries couldn't be found at: ", $binDir, "\n";
39 }
40
41 # Run the tests from the command line (if any).
42 if (scalar(@ARGV)) {
43     foreach $testName(@ARGV) {
44         system($testName);
45     }
46 } else {
47     opendir(DIR, $binDir);
48     while (my $testName = readdir(DIR)) {
49         next unless ($testName =~ m/^test_ewk2_/);
50         # Execute the test.
51         system($binDir . $testName);
52     }
53     closedir(DIR);
54 }
55
56