From 11bb996c45ff4a57c0b9d412ee06f5ff54d5490a Mon Sep 17 00:00:00 2001 From: Alexandre Montplaisir Date: Fri, 10 Jul 2015 19:55:56 -0400 Subject: [PATCH 1/1] Add new custom test suite to run the SWTBot tests repeatedly Change-Id: Ida815384e4aed172194b830d196f3a595a1dc8d4 Signed-off-by: Alexandre Montplaisir Reviewed-on: https://git.eclipse.org/r/51779 Reviewed-by: Hudson CI Reviewed-by: Marc-Andre Laperle Tested-by: Marc-Andre Laperle --- .../.gitignore | 3 +- .../alltests/swtbot/SWTBotStressTests.java | 35 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 releng/org.eclipse.tracecompass.alltests/src/org/eclipse/tracecompass/alltests/swtbot/SWTBotStressTests.java diff --git a/releng/org.eclipse.tracecompass.alltests/.gitignore b/releng/org.eclipse.tracecompass.alltests/.gitignore index 94a2dd146a..a2c1640309 100644 --- a/releng/org.eclipse.tracecompass.alltests/.gitignore +++ b/releng/org.eclipse.tracecompass.alltests/.gitignore @@ -1 +1,2 @@ -*.json \ No newline at end of file +*.json +screenshots/ diff --git a/releng/org.eclipse.tracecompass.alltests/src/org/eclipse/tracecompass/alltests/swtbot/SWTBotStressTests.java b/releng/org.eclipse.tracecompass.alltests/src/org/eclipse/tracecompass/alltests/swtbot/SWTBotStressTests.java new file mode 100644 index 0000000000..ddac4dccfd --- /dev/null +++ b/releng/org.eclipse.tracecompass.alltests/src/org/eclipse/tracecompass/alltests/swtbot/SWTBotStressTests.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2015 EfficiOS Inc. and others + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License v1.0 which + * accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Alexandre Montplaisir - Initial API and implementation + *******************************************************************************/ + +package org.eclipse.tracecompass.alltests.swtbot; + +import junit.framework.JUnit4TestAdapter; +import junit.framework.TestSuite; + +/** + * Run the {@link RunAllSWTBotTests} suite a lot of times, to catch flaky tests. + */ +public class SWTBotStressTests extends TestSuite { + + private static final int NB_RUNS = 20; + + /** + * @return Test suite definition + */ + public static TestSuite suite() { + TestSuite s = new TestSuite(); + for (int i = 0; i < NB_RUNS; i++) { + s.addTest(new JUnit4TestAdapter(RunAllSWTBotTests.class)); + } + return s; + } +} \ No newline at end of file -- 2.34.1