This repository has been archived by the owner on Oct 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for addDependencyBasedRequires option
- Loading branch information
1 parent
a6b32cd
commit 8553f79
Showing
5 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals = clean package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.codehaus.mojo.rpm.its</groupId> | ||
<artifactId>rpm-dependency-based-requires</artifactId> | ||
<version>1.0</version> | ||
<packaging>pom</packaging> | ||
|
||
<modules> | ||
<module>rpm-dep</module> | ||
<module>rpm-rpm</module> | ||
</modules> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.codehaus.mojo.rpm.its</groupId> | ||
<artifactId>rpm-dependency-based-requires-rpm-dep</artifactId> | ||
<version>8.1</version> | ||
<packaging>rpm</packaging> | ||
|
||
<inceptionYear>2009</inceptionYear> | ||
<organization> | ||
<name>my org</name> | ||
<url>www.my.org</url> | ||
</organization> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>rpm-maven-plugin</artifactId> | ||
<version>@pom.version@</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<distribution>My App</distribution> | ||
<group>Application/Collectors</group> | ||
<release>rel</release> | ||
<needarch>false</needarch> | ||
<defaultUsername>myuser</defaultUsername> | ||
<defaultGroupname>mygroup</defaultGroupname> | ||
<mappings> | ||
<mapping> | ||
<directory>/usr/myusr/app</directory> | ||
<dependency /> | ||
<directoryIncluded>false</directoryIncluded> | ||
</mapping> | ||
</mappings> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.codehaus.mojo.rpm.its</groupId> | ||
<artifactId>rpm-dependency-based-requires-rpm-rpm</artifactId> | ||
<version>1.0</version> | ||
<packaging>rpm</packaging> | ||
|
||
<inceptionYear>2009</inceptionYear> | ||
<organization> | ||
<name>my org</name> | ||
<url>www.my.org</url> | ||
</organization> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.codehaus.mojo.rpm.its</groupId> | ||
<artifactId>rpm-dependency-based-requires-rpm-dep</artifactId> | ||
<version>8.1</version> | ||
<type>rpm</type> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>rpm-maven-plugin</artifactId> | ||
<version>@pom.version@</version> | ||
<extensions>true</extensions> | ||
<configuration> | ||
<distribution>My App</distribution> | ||
<group>Application/Collectors</group> | ||
<release>rel</release> | ||
<needarch>false</needarch> | ||
<defaultUsername>myuser</defaultUsername> | ||
<defaultGroupname>mygroup</defaultGroupname> | ||
<addDependencyBasedRequires>true</addDependencyBasedRequires> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
File rpm = new File(basedir, "rpm-rpm/target/rpm/rpm-dependency-based-requires-rpm-rpm/RPMS/noarch/rpm-dependency-based-requires-rpm-rpm-1.0-rel.noarch.rpm") | ||
if (!rpm.exists()) | ||
throw new AssertionError("rpm file does not exist: ${rpm.getAbsolutePath()}") | ||
|
||
def proc = ["rpm", "-qpR", rpm.getAbsolutePath()].execute() | ||
proc.waitFor() | ||
if (!proc.in.text.contains("rpm-dependency-based-requires-rpm-dep >= 8.1-rel")) | ||
throw new AssertionError("Dependency to rpm-dependency-based-requires-rpm-dep missing!") | ||
|
||
return true |