Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Conflicts: package/yast2-core.changes package/yast2-core.spec Rakefile
- Loading branch information
Showing
10 changed files
with
85 additions
and
3 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 |
---|---|---|
|
@@ -10,6 +10,7 @@ Makefile | |
Makefile.in | ||
/Makefile.am | ||
Makefile.am.common | ||
compile | ||
config.h | ||
config.cache | ||
config.guess | ||
|
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
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 |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
# Makefile.am for core/base | ||
# | ||
|
||
SUBDIRS = src tools | ||
SUBDIRS = src tools testsuite | ||
|
||
EXTRA_DIST = test-helper.exp |
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,2 @@ | ||
*.log | ||
*.trs |
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,9 @@ | ||
ITESTS = \ | ||
target_root.ycp | ||
|
||
EXTRA_DIST = $(ITESTS) y2base.sh | ||
|
||
check-local: | ||
for t in $(ITESTS); do \ | ||
./y2base.sh $$t || { cat $${t%.*}.log; exit 1; }; \ | ||
done |
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 @@ | ||
BOOT_IMAGE=fbdev ro root=801 |
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,41 @@ | ||
{ | ||
any with_scr_root(string root, any () action) { | ||
string component = sformat("chroot=%1:scr", root); | ||
boolean check_version = false; | ||
integer handle = WFM::SCROpen(component, check_version); | ||
WFM::SCRSetDefault(handle); | ||
|
||
any result = action(); | ||
|
||
WFM::SCRSetDefault(0); | ||
WFM::SCRClose(handle); | ||
return result; | ||
} | ||
|
||
boolean test_anyagent() { | ||
SCR::RegisterAgent( | ||
.tested, | ||
`ag_anyagent( | ||
`Description ( | ||
`File ("/toplevel/target_root"), | ||
"#\n", // Comment | ||
true, // read-only | ||
`List ( | ||
`String ("^ \n"), | ||
" " | ||
) | ||
) | ||
) | ||
); | ||
|
||
any read = SCR::Read(.tested); | ||
|
||
any expected = ["BOOT_IMAGE=fbdev", "ro", "root=801"]; | ||
y2milestone ("Expected: %1", expected); | ||
y2milestone ("Read: %1", read); | ||
return read == expected; | ||
} | ||
|
||
string root = sformat("%1/data", WFM::Args(0)); | ||
return with_scr_root(root, test_anyagent); | ||
} |
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,18 @@ | ||
#!/bin/sh | ||
ROOT=../.. | ||
LIBS=src/.libs | ||
AG_ANY_DIR=$ROOT/agent-any/$LIBS | ||
# The agent is looked for not in $Y2DIR but in $Y2DIR/plugin so create 'plugin' | ||
ln -snf . $AG_ANY_DIR/plugin | ||
export Y2DIR=$AG_ANY_DIR | ||
export LD_LIBRARY_PATH="\ | ||
$ROOT/liby2util-r/$LIBS:\ | ||
$ROOT/libycp/$LIBS:\ | ||
$ROOT/liby2/$LIBS:\ | ||
$ROOT/libscr/$LIBS:\ | ||
$ROOT/wfm/$LIBS:\ | ||
$ROOT/scr/$LIBS\ | ||
" | ||
# ignore incompatible ruby-bindings while developing | ||
export Y2DISABLELANGUAGEPLUGINS=1 | ||
../$LIBS/y2base -l ${1%.*}.log ./$1 -S "($(pwd))" testsuite |
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
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