Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
147 additions
and
108 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,22 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More tests => 1; | ||
|
||
eval { | ||
my $oscrc="$::ENV{HOME}/.oscrc"; | ||
open(OSCRC,'>',$oscrc) || die "Could not open $oscrc: $!"; | ||
print OSCRC "[general] | ||
apiurl = https://localhost | ||
[https://localhost] | ||
user=Admin | ||
pass=opensuse | ||
"; | ||
close OSCRC; | ||
}; | ||
|
||
ok(!$@,"Configuring oscrc"); | ||
|
||
exit 0 |
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More tests => 1; | ||
use FindBin; | ||
|
||
system("osc meta prj openSUSE.org -F $FindBin::Bin/fixtures/openSUSE.org.xml"); | ||
|
||
ok(!$?,"Configuring interconnect"); | ||
|
||
exit 0; |
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More tests => 1; | ||
use FindBin; | ||
|
||
system("osc meta prj home:Admin -F $FindBin::Bin/fixtures/home:Admin.xml"); | ||
|
||
ok(!$?,"Checking creation of home:Admin project"); | ||
|
||
exit 0 |
This file was deleted.
Oops, something went wrong.
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,67 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More tests => 5; | ||
use FindBin; | ||
use File::Path qw(make_path remove_tree); | ||
use File::Copy; | ||
my $RCODE=0; | ||
|
||
my $TMP_DIR="$FindBin::Bin/tmp"; | ||
|
||
# prepare TMP_DIR | ||
remove_tree($TMP_DIR); | ||
make_path($TMP_DIR); | ||
chdir($TMP_DIR); | ||
|
||
# checkout home:Admin | ||
system("osc co home:Admin"); | ||
|
||
ok(!$?,"Checking preparation of project"); | ||
|
||
# prepare package | ||
eval { | ||
chdir("home:Admin") || die "Could not change to directory 'home:Admin': $!"; | ||
mkdir("obs-testpackage") || die "Could not create directory 'obs-testpackage':$!"; | ||
system("osc add obs-testpackage"); | ||
die "Could not add package 'obs-testpackage' via osc" if ($?); | ||
chdir("obs-testpackage") || die "Could not change to directory '".cwd()."/obs-testpackage': $!"; | ||
|
||
my $src="$FindBin::Bin/fixtures/obs-testpackage._service"; | ||
my $dst="./_service"; | ||
copy($src,$dst) or die "Copy '$src' -> '$dst' failed: $!"; | ||
system("osc ar"); | ||
die "Could not add files to package via osc!" if ($?); | ||
}; | ||
|
||
ok(!$@,"Checking preparation of package"); | ||
|
||
# commit package | ||
system('osc ci -m "initial version"'); | ||
ok(!$?,"Checking initial commit of package obs-testpackage"); | ||
|
||
eval { | ||
# wait for package to finish build | ||
system("osc r -w"); | ||
die "Error while waiting for package to finish" if ($?); | ||
}; | ||
|
||
ok(!$@,"Finished building of package"); | ||
my @succeed; | ||
|
||
eval { | ||
my @result = `osc r`; | ||
|
||
# count succeed | ||
my $succeed = 0; | ||
@succeed = grep { /succeeded/ } @result; | ||
}; | ||
|
||
my $r = ok(@succeed == 2,"Checking succeed builds"); | ||
if (! $r) { | ||
open(F,">","$TMP_DIR/.SKIP") || die "Error while touching $TMP_DIR/.SKIP: $!"; | ||
close(F); | ||
} | ||
|
||
exit 0 |
This file was deleted.
Oops, something went wrong.
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,29 @@ | ||
#!/usr/bin/env perl | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More; | ||
use FindBin; | ||
use File::Path qw(make_path remove_tree); | ||
|
||
my $TMP_DIR="$FindBin::Bin/tmp/"; | ||
if ( -f "$TMP_DIR/.SKIP" ) { | ||
plan skip_all => "Previous tests failed - keeping results"; | ||
} else { | ||
plan tests => 2; | ||
|
||
chdir("$TMP_DIR/home:Admin"); | ||
|
||
system("osc delete obs-testpackage"); | ||
|
||
ok(!$?,"Deleting package obs-testpackage"); | ||
|
||
system("osc ci -m \"removed package obs-testpackage\""); | ||
ok(!$?,"Commiting deleted package obs-testpackage"); | ||
|
||
# cleanup TMP_DIR | ||
chdir($FindBin::Bin); | ||
remove_tree($TMP_DIR); | ||
} | ||
|
||
exit 0; |
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,5 @@ | ||
check: | ||
@for i in *.t;do perl -c $$i;done | ||
|
||
test_system: | ||
prove -v *.ts |