Compare commits
36 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
94e270c296 | ||
|
|
b5f673c7a9 | ||
|
|
06500df428 | ||
|
|
deba8e880a | ||
|
|
8bbeb56cb9 | ||
|
|
2855e11b06 | ||
|
|
6c08144b03 | ||
|
|
b7f1e8915c | ||
|
|
2e38dd3794 | ||
|
|
d7d705eeb0 | ||
|
|
38941e11e6 | ||
|
|
c6ae02595f | ||
|
|
fa7896e252 | ||
|
|
8d1e10f3a0 | ||
|
|
1984302803 | ||
|
|
623a06f450 | ||
|
|
5d17506955 | ||
|
|
6531f346ad | ||
|
|
039f22b98f | ||
|
|
a08c0f1b43 | ||
|
|
d6e61ba4c0 | ||
|
|
251d6ae684 | ||
|
|
62b1a76cae | ||
|
|
dba8b68295 | ||
|
|
37337b27c0 | ||
|
|
37790c4096 | ||
|
|
ec344a7c3e | ||
|
|
41c4232f87 | ||
|
|
72e64cb57e | ||
|
|
ac24e97244 | ||
|
|
a626ffc4e9 | ||
|
|
2a0f245e82 | ||
|
|
7328eeb7ee | ||
|
|
337efe8a9e | ||
|
|
7e2daf708c | ||
|
|
d145b9e4af |
6 changed files with 219 additions and 142 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -10,3 +10,6 @@
|
|||
/4.0.3.tar.gz
|
||||
/4.0.4.tar.gz
|
||||
/4.0.5.tar.gz
|
||||
/4.0.15.tar.gz
|
||||
/4.0.16.tar.gz
|
||||
/4.0.26.tar.gz
|
||||
|
|
|
|||
175
byteman.spec
175
byteman.spec
|
|
@ -14,47 +14,49 @@
|
|||
%global bindir %{homedir}/bin
|
||||
|
||||
Name: byteman
|
||||
Version: 4.0.5
|
||||
Release: 2%{?dist}
|
||||
Version: 4.0.26
|
||||
Release: 1%{?dist}
|
||||
Summary: Java agent-based bytecode injection tool
|
||||
License: LGPLv2+
|
||||
# Automatically converted from old format: LGPLv2+ - review is highly recommended.
|
||||
License: LicenseRef-Callaway-LGPLv2+
|
||||
URL: http://www.jboss.org/byteman
|
||||
# wget -O 4.0.5.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.5.tar.gz
|
||||
# wget -O 4.0.16.tar.gz https://github.com/bytemanproject/byteman/archive/4.0.16.tar.gz
|
||||
Source0: https://github.com/bytemanproject/byteman/archive/%{version}.tar.gz
|
||||
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
|
||||
# Byteman 4.x requires JDK 9+ to build. Require JDK 10 explicitly.
|
||||
BuildRequires: java-11-openjdk-devel
|
||||
BuildRequires: maven-local
|
||||
BuildRequires: java-25-devel >= 1:11
|
||||
BuildRequires: maven-local-openjdk25
|
||||
BuildRequires: maven-shade-plugin
|
||||
BuildRequires: maven-source-plugin
|
||||
BuildRequires: maven-plugin-plugin
|
||||
BuildRequires: maven-plugin-bundle
|
||||
BuildRequires: maven-bundle-plugin
|
||||
BuildRequires: maven-assembly-plugin
|
||||
BuildRequires: maven-failsafe-plugin
|
||||
BuildRequires: maven-jar-plugin
|
||||
BuildRequires: maven-surefire-plugin
|
||||
BuildRequires: maven-surefire-provider-testng
|
||||
BuildRequires: maven-surefire-provider-junit
|
||||
BuildRequires: maven-surefire-provider-junit5
|
||||
BuildRequires: maven-verifier-plugin
|
||||
BuildRequires: maven-dependency-plugin
|
||||
BuildRequires: java_cup
|
||||
BuildRequires: jarjar
|
||||
BuildRequires: objectweb-asm
|
||||
BuildRequires: junit
|
||||
BuildRequires: junit5
|
||||
BuildRequires: testng
|
||||
# JBoss modules byteman plugin requires it
|
||||
BuildRequires: mvn(org.jboss.modules:jboss-modules)
|
||||
|
||||
Provides: bundled(objectweb-asm) = 7.0
|
||||
Provides: bundled(java_cup) = 1:0.11b-8
|
||||
Provides: bundled(objectweb-asm) = 9.1
|
||||
Provides: bundled(java_cup) = 1:0.11b-17
|
||||
# We are filtering java-headless >= 1:1.9 requirement. Add
|
||||
# JDK 8 requirement here explicitly which shouldn't match the filter.
|
||||
Requires: java-headless >= 1:1.8
|
||||
Requires: java-25-headless >= 1:1.8
|
||||
|
||||
# Related pieces removed via pom_xpath_remove macros
|
||||
Patch1: remove_submit_integration_test_verification.patch
|
||||
Patch2: testng7_port.patch
|
||||
|
||||
%description
|
||||
Byteman is a tool which simplifies tracing and testing of Java programs.
|
||||
|
|
@ -106,7 +108,8 @@ sed -i "s|java-cup|java_cup|" tests/pom.xml
|
|||
# Remove Submit integration test invocations (agent)
|
||||
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-failsafe-plugin']/pom:executions/pom:execution[pom:id='submit.TestSubmit']" agent
|
||||
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-failsafe-plugin']/pom:executions/pom:execution[pom:id='submit.TestSubmit.compiled']" agent
|
||||
%patch1 -p2
|
||||
%patch -P1 -p2
|
||||
%patch -P2 -p2
|
||||
|
||||
# Remove Submit integration test invocations (tests)
|
||||
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-failsafe-plugin']/pom:executions/pom:execution[pom:id='submit.TestSubmit']" tests
|
||||
|
|
@ -122,24 +125,37 @@ sed -i "s|java-cup|java_cup|" tests/pom.xml
|
|||
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:executions" contrib/bmunit
|
||||
%pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:configuration" '<skip>true</skip>' contrib/bmunit
|
||||
|
||||
# source/target 1.6 is not supported by 17; default is now 1.8
|
||||
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:source" pom.xml
|
||||
%pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:target" pom.xml
|
||||
|
||||
# Don't build download, docs modules
|
||||
%pom_disable_module download
|
||||
%pom_disable_module docs
|
||||
|
||||
|
||||
# Don't use javadoc plugin, use XMvn for javadocs
|
||||
%pom_remove_plugin -r :maven-javadoc-plugin
|
||||
%pom_remove_plugin -r :central-publishing-maven-plugin
|
||||
%pom_remove_dep 'org.apache.maven:maven-project' contrib/rulecheck-maven-plugin
|
||||
%pom_xpath_remove 'pom:execution[pom:id="make-javadoc-assembly"]' byteman
|
||||
|
||||
# Put byteman-rulecheck-maven-plugin into a separate package
|
||||
%mvn_package ":byteman-rulecheck-maven-plugin" rulecheck-maven-plugin
|
||||
|
||||
# CNFE being thrown without this for bmunit5 in rawhide and with tests enabled
|
||||
%pom_add_dep "org.apache.commons:commons-lang3" contrib/bmunit5
|
||||
# Put byteman-bmunit/byteman-dtest into a separate packages since they
|
||||
# runtime require junit
|
||||
%mvn_package ":byteman-bmunit" bmunit
|
||||
%mvn_package ":byteman-dtest" dtest
|
||||
|
||||
%build
|
||||
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk
|
||||
%mvn_build
|
||||
export JAVA_HOME=/usr/lib/jvm/java-openjdk
|
||||
# Use --xmvn-javadoc so as to avoid maven-javadoc-plugin issue
|
||||
# (fixed in 3.1.0, fedora has 3.0.1):
|
||||
# See https://issues.apache.org/jira/browse/MJAVADOC-555
|
||||
# https://bugs.openjdk.java.net/browse/JDK-8212233
|
||||
%mvn_build --xmvn-javadoc -f
|
||||
|
||||
%install
|
||||
%mvn_install
|
||||
|
|
@ -206,127 +222,4 @@ ln -s %{_javadir}/byteman/byteman.jar $RPM_BUILD_ROOT%{homedir}/lib/byteman.jar
|
|||
%{homedir}/lib/byteman-dtest.jar
|
||||
|
||||
%changelog
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.5-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Wed Nov 21 2018 Severin Gehwolf <sgehwolf@redhat.com> - 4.0.5-1
|
||||
- Update to latest upstream 4.0.5 release.
|
||||
|
||||
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.4-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Tue Jul 10 2018 Severin Gehwolf <sgehwolf@redhat.com> - 4.0.4-1
|
||||
- Update to latest upstream 4.0.4 release.
|
||||
- Split junit-dependent packages into sub-packages:
|
||||
byteman-dtest, byteman-bmunit
|
||||
- Fix automatically generated requirements:
|
||||
- ASM is BR-only and bundled.
|
||||
- java-headless >= 1:1.9 would get generated, but byteman 4.x
|
||||
runs on JDK 8 too (would even work for JDK 6)
|
||||
|
||||
* Thu Jul 05 2018 Severin Gehwolf <sgehwolf@redhat.com> - 4.0.3-2
|
||||
- Don't use maven-javadoc-plugin. Use XMvn instead.
|
||||
|
||||
* Tue Jul 03 2018 Severin Gehwolf <sgehwolf@redhat.com> - 4.0.3-1
|
||||
- Update to latest upstream 4.0.3 release.
|
||||
|
||||
* Fri Apr 27 2018 Severin Gehwolf <sgehwolf@redhat.com> - 4.0.2-1
|
||||
- Update to latest upstream 4.0.2 release.
|
||||
- Adds support for modular JDKs.
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.6-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.6-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.6-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Fri Dec 09 2016 Severin Gehwolf <sgehwolf@redhat.com> - 3.0.6-2
|
||||
- Add BRs, maven-plugin-bundle, maven-source-plugin and
|
||||
maven-plugin-plugin, fixing FTBFS.
|
||||
- Resolves: RHBZ#1402998
|
||||
|
||||
* Mon Jun 13 2016 Severin Gehwolf <sgehwolf@redhat.com> - 3.0.6-1
|
||||
- Update to latest upstream release.
|
||||
|
||||
* Mon Mar 14 2016 Severin Gehwolf <sgehwolf@redhat.com> - 3.0.4-2
|
||||
- Enable some tests during build
|
||||
- Fix generated requires by filtering requires for bundled libs.
|
||||
- Split maven plugin into separate package.
|
||||
|
||||
* Thu Feb 18 2016 Severin Gehwolf <sgehwolf@redhat.com> - 3.0.4-1
|
||||
- Update to latest upstream 3.0.4 release.
|
||||
|
||||
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.4.1-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Thu Aug 06 2015 gil cattaneo <puntogil@libero.it> 2.1.4.1-7
|
||||
- Fix FTBFS rhbz#1239392
|
||||
- Remove duplicate files
|
||||
- Introduce license macro
|
||||
|
||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.4.1-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Fri Feb 27 2015 Michal Srb <msrb@redhat.com> - 2.1.4.1-5
|
||||
- Fix FTBFS
|
||||
- Rebuild to generate new metadata
|
||||
|
||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.4.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||
|
||||
* Fri Apr 18 2014 Marek Goldmann <mgoldman@redhat.com> - 2.1.4.1-3
|
||||
- Rebuilding for objectweb-asm update, RHBZ#1083570
|
||||
|
||||
* Fri Mar 28 2014 Michael Simacek <msimacek@redhat.com> - 2.1.4.1-2
|
||||
- Use Requires: java-headless rebuild (#1067528)
|
||||
|
||||
* Fri Feb 14 2014 Marek Goldmann <mgoldman@redhat.com> - 2.1.4.1-1
|
||||
- Upstream release 2.1.4.1
|
||||
|
||||
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.2-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
|
||||
* Thu Jul 04 2013 Marek Goldmann <mgoldman@redhat.com> - 2.1.2-1
|
||||
- Upstream release 2.1.2
|
||||
|
||||
* Wed Jun 5 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 2.0.4-5
|
||||
- Remove tools.jar from dependencyManagement
|
||||
|
||||
* Wed May 29 2013 Marek Goldmann <mgoldman@redhat.com> - 2.0.4-4
|
||||
- New guidelines
|
||||
|
||||
* Thu Apr 25 2013 Marek Goldmann <mgoldman@redhat.com> - 2.0.4-3
|
||||
- Fixes to the launch scripts
|
||||
|
||||
* Wed Apr 24 2013 Marek Goldmann <mgoldman@redhat.com> - 2.0.4-2
|
||||
- Added bmsubmit, bminstall and bmjava scripts, RHBZ#951560
|
||||
|
||||
* Thu Feb 21 2013 Marek Goldmann <mgoldman@redhat.com> - 2.0.4-1
|
||||
- Upstream release 2.0.4
|
||||
- Switched to Maven
|
||||
- Bundling java_cup and objectweb-asm (fpc#226)
|
||||
|
||||
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.2-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Tue Sep 20 2011 Marek Goldmann <mgoldman@redhat.com> 1.5.2-3
|
||||
- Removed binary files from src.rpm
|
||||
|
||||
* Mon Sep 19 2011 Marek Goldmann <mgoldman@redhat.com> 1.5.2-2
|
||||
- Cleaned spec file
|
||||
|
||||
* Wed Jul 27 2011 Marek Goldmann <mgoldman@redhat.com> 1.5.2-1
|
||||
- Upstream release: 1.5.2
|
||||
|
||||
* Thu Jul 21 2011 Marek Goldmann <mgoldman@redhat.com> 1.5.1-1
|
||||
- Initial packaging
|
||||
|
||||
%autochangelog
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (4.0.5.tar.gz) = 2a9bd3d19ccfe2208c791422fc7bb89c2c322779c5ce4b917b50a9ec131ed23ca78f374e6e3c457774a06934446019a92ad4aea6402757ab6a82e8d6dd3afae7
|
||||
SHA512 (4.0.26.tar.gz) = 06c8bf688d237d8dbac1e4558a8e2916f1212d2746d81a64e8bc44f9074f5b1c205bb98ac3a8e835f0c8b225df665e40c93c8b60ff5ff77f6ce8272c25679d76
|
||||
|
|
|
|||
22
testng7_port.patch
Normal file
22
testng7_port.patch
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java b/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java
|
||||
index 2f784bc..9e4fec9 100644
|
||||
--- a/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java
|
||||
+++ b/byteman-4.0.15/contrib/bmunit/src/org/jboss/byteman/contrib/bmunit/BMNGListener.java
|
||||
@@ -61,7 +61,7 @@ public class BMNGListener extends BMNGAbstractRunner implements IInvokedMethodLi
|
||||
}
|
||||
|
||||
public void beforeInvocation(IInvokedMethod method, ITestResult testResult) {
|
||||
- Method javaMethod = method.getTestMethod().getMethod();
|
||||
+ Method javaMethod = method.getTestMethod().getConstructorOrMethod().getMethod();
|
||||
Class clazz = javaMethod.getDeclaringClass();
|
||||
if (!checkBMNGListener(clazz)) {
|
||||
return;
|
||||
@@ -81,7 +81,7 @@ public class BMNGListener extends BMNGAbstractRunner implements IInvokedMethodLi
|
||||
}
|
||||
|
||||
public void afterInvocation(IInvokedMethod method, ITestResult testResult) {
|
||||
- Method javaMethod = method.getTestMethod().getMethod();
|
||||
+ Method javaMethod = method.getTestMethod().getConstructorOrMethod().getMethod();
|
||||
Class clazz = javaMethod.getDeclaringClass();
|
||||
if (!checkBMNGListener(clazz)) {
|
||||
return;
|
||||
147
tests/smoke/test-smoke.sh
Normal file
147
tests/smoke/test-smoke.sh
Normal file
|
|
@ -0,0 +1,147 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
set -e
|
||||
|
||||
##############################################################
|
||||
#
|
||||
# Test 1: bmjava
|
||||
#
|
||||
##############################################################
|
||||
test1_dir=$(mktemp -d)
|
||||
pushd $test1_dir
|
||||
#####
|
||||
## The Java program under test (via bmjava)
|
||||
#####
|
||||
cat > HelloWait.java <<EOF1
|
||||
public class HelloWait {
|
||||
|
||||
public static class FooBar {
|
||||
public void doSomething(String arg) {
|
||||
System.out.println("Hello " + arg);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
FooBar fooBar = new FooBar();
|
||||
fooBar.doSomething("World!");
|
||||
}
|
||||
|
||||
}
|
||||
EOF1
|
||||
javac -g HelloWait.java
|
||||
#####
|
||||
## The byteman rule (used via bmjava)
|
||||
#####
|
||||
cat > trace1.btm <<EOF2
|
||||
RULE trace doSomething entry
|
||||
CLASS HelloWait\$FooBar
|
||||
METHOD doSomething(java.lang.String)
|
||||
AT ENTRY
|
||||
IF true
|
||||
DO
|
||||
traceln("argument was: " + \$1);
|
||||
\$1 = "bar";
|
||||
ENDRULE
|
||||
EOF2
|
||||
|
||||
bmjava -p 5555 -h 127.0.0.1 -l trace1.btm HelloWait > out1.log
|
||||
grep -q "argument was: World!" out1.log
|
||||
grep -q "Hello bar" out1.log
|
||||
output=$(tail -n1 out1.log)
|
||||
if [ ! "${output}_" == "Hello bar_" ]; then
|
||||
echo Test FAILED!
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo Test 1 PASSED!
|
||||
|
||||
popd
|
||||
rm -rf $test1_dir
|
||||
|
||||
|
||||
##############################################################
|
||||
#
|
||||
# Test 2: bminstall + bmsubmit
|
||||
#
|
||||
##############################################################
|
||||
test2_dir=$(mktemp -d)
|
||||
pushd $test2_dir
|
||||
#####
|
||||
## The Java program under test
|
||||
#####
|
||||
cat > HelloWait.java <<EOF3
|
||||
public class HelloWait {
|
||||
|
||||
public static class FooBar {
|
||||
public void doSomething(String arg) {
|
||||
System.out.println("Hello " + arg);
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
FooBar fooBar = new FooBar();
|
||||
try {
|
||||
while (true) {
|
||||
fooBar.doSomething("World!");
|
||||
Thread.sleep(300);
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
EOF3
|
||||
javac -g HelloWait.java
|
||||
java HelloWait > out2.log 2>&1 &
|
||||
pid_of_java=$$
|
||||
echo "Forked java process with pid $pid_of_java"
|
||||
sleep 2
|
||||
#####
|
||||
## The byteman rule(s) (used via bmsubmit)
|
||||
#####
|
||||
cat > change_arg.btm <<EOF4
|
||||
RULE change doSomething arg
|
||||
CLASS HelloWait\$FooBar
|
||||
METHOD doSomething(java.lang.String)
|
||||
AT ENTRY
|
||||
IF true
|
||||
DO
|
||||
\$1 = "THERE!";
|
||||
ENDRULE
|
||||
EOF4
|
||||
cat > throw_excptn.btm <<EOF5
|
||||
RULE throw exception when leaving doSomething
|
||||
CLASS HelloWait\$FooBar
|
||||
METHOD doSomething(java.lang.String)
|
||||
AT EXIT
|
||||
IF true
|
||||
DO
|
||||
THROW new RuntimeException("Boom!")
|
||||
ENDRULE
|
||||
EOF5
|
||||
|
||||
# Install the agent
|
||||
bminstall -p 5555 -h 127.0.0.1 HelloWait
|
||||
# Install the change arg rule
|
||||
bmsubmit -p 5555 -h 127.0.0.1 -l change_arg.btm
|
||||
sleep 2
|
||||
# Unload the change arg rule
|
||||
bmsubmit -p 5555 -h 127.0.0.1 -u change_arg.btm
|
||||
# Install the exception throwing rule
|
||||
bmsubmit -p 5555 -h 127.0.0.1 -l throw_excptn.btm
|
||||
sleep 1
|
||||
|
||||
# Verify the log
|
||||
head -n10 out2.log | grep -q "Hello World!"
|
||||
hello_th_count=$(grep "Hello THERE!" out2.log | wc -l)
|
||||
if [ $hello_th_count -lt 1 ]; then
|
||||
echo "Test 2 FAILED!"
|
||||
exit 1
|
||||
fi
|
||||
grep -q "Boom!" out2.log
|
||||
grep -q "RuntimeException" out2.log
|
||||
echo Test 2 PASSED!
|
||||
|
||||
popd
|
||||
rm -rf $test2_dir
|
||||
12
tests/tests.yml
Normal file
12
tests/tests.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-beakerlib
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- byteman
|
||||
- java-11-openjdk-devel
|
||||
|
||||
tests:
|
||||
- smoke/test-smoke.sh
|
||||
Loading…
Add table
Add a link
Reference in a new issue