Skip to content
Snippets Groups Projects
Commit cda7de78 authored by Luis Araujo's avatar Luis Araujo
Browse files

Add webkit2gtk javascript core test


This commit adds the webkit2gtk javascript core LAVA test definition
and the test script to execute the tests.

Signed-off-by: default avatarLuis Araujo <luis.araujo@collabora.co.uk>
Reviewed-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
Differential Revision: https://phabricator.apertis.org/D6476
parent fe3e1cd6
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# run-webkit2gtk-jsc-tests — run WebKit2GTK JavaScriptCore tests
#
# Copyright © 2017 Collabora Ltd.
#
# SPDX-License-Identifier: MPL-2.0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
set -e
JSC_BIN="/usr/bin/jsc/jsc"
# Run tests in a temporary directory.
TEST_DIR=$(mktemp --directory --tmpdir webkit2gtk-tests.XXXXXXXXXX)
echo "Test directory: '${TEST_DIR}'"
TEST_BIN_DIR="${TEST_DIR}/bin"
TEST_SOURCES="/usr/share/webkit2gtk/testing"
TEST_COMMAND="${TEST_SOURCES}/Tools/Scripts/run-javascriptcore-tests --gtk --no-build"
RESULTS_FILE="${TEST_BIN_DIR}/jsc-stress-results/results"
# Setup test environment
mkdir -p "${TEST_BIN_DIR}"
ln -s "${JSC_BIN}" "${TEST_BIN_DIR}/jsc"
# Run tests using the 'run-javascriptcore-tests' command
# Ignore failed exit code as this command exits with an
# error if a test fails.
${TEST_COMMAND} --root="${TEST_DIR}" \
--sources="${TEST_SOURCES}" \
--jsc-driver-args='-v' || echo "tests exit code: $?"
# Show all results at the end
if [ ! -r "${RESULTS_FILE}" ]
then
echo "No results file available: ${RESULTS_FILE}"
echo "showing-tests-results: FAIL"
exit 1
fi
cat "${RESULTS_FILE}"
metadata:
name: webkit2gtk-jsc
format: "Lava-Test-Shell Test Definition 1.0"
description: "Run WebKit2GTK javascriptcore tests"
maintainer: "luis.araujo@collabora.co.uk"
scope:
- functional
environment:
- lava-test-shell
install:
deps:
- make
- perl-doc
- ruby
- webkit2gtk-testing
run:
steps:
- common/run-test-in-systemd --name=run-webkit2gtk-jsc-tests --timeout=18000 --user=user --
webkit/run-webkit2gtk-jsc-tests
parse:
fixupdict:
FAIL: fail
PASS: pass
pattern: '^.*/(?P<test_case_id>[a-zA-Z0-9_\-\.]+):\s(?P<result>PASS|FAIL)'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment