1 /******************************************************************************* 2 * Copyright (c) 2009, 2018 Mountainminds GmbH & Co. KG and Contributors 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * Brock Janiczak - initial API and implementation 10 * 11 *******************************************************************************/ 12 package org.jacoco.ant; 13 14 import java.io.File; 15 import java.io.IOException; 16 17 import junit.framework.TestSuite; 18 19 import org.apache.ant.antunit.junit3.AntUnitSuite; 20 import org.apache.ant.antunit.junit4.AntUnitSuiteRunner; 21 import org.jacoco.agent.AgentJar; 22 import org.junit.runner.RunWith; 23 24 @RunWith(AntUnitSuiteRunner.class) 25 public class InstrumentTaskTest { 26 27 public static TestSuite suite() throws IOException { 28 System.setProperty("org.jacoco.ant.instrumentTaskTest.classes.dir", 29 TestTarget.getClassPath()); 30 System.setProperty("org.jacoco.ant.instrumentTaskTest.agent.file", 31 AgentJar.extractToTempLocation().getAbsolutePath()); 32 final File file = new File("src/org/jacoco/ant/InstrumentTaskTest.xml"); 33 return new AntUnitSuite(file, InstrumentTaskTest.class); 34 } 35 36 } 37