-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from mchf/master
Why this? Recall that this test suite works by mocking and watching the SCR layer. Even if we don't mock anything, errors are recorded, like if a sysconfig file (console here) is missing. The tested code imports several modules, and some of them have *constructors*. That's where we read sysconfig/console even if we don't care. A better way to fix this is to remove the constructors and replace the public variables they initialize by a lazy functional API. In this case it means touching yast2.rpm (Encoding.ycp) and yast2-country.rpm (using Encoding::console).
- Loading branch information
Showing
5 changed files
with
59 additions
and
1 deletion.
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
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 @@ | ||
Read .target.tmpdir nil | ||
Log Failed to set temporary directory: nil | ||
Read .probe.architecture "i386" | ||
Read .sysconfig.console.CONSOLE_ENCODING nil | ||
Execute .target.bash_output "locale -k charmap" $["exit":0, "stderr":"", "stdout":""] |
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 |
---|---|---|
@@ -1,4 +1,26 @@ | ||
// A basic syntax check | ||
{ | ||
include "network/lan/hardware.ycp"; | ||
// wonderful, isn't it? Believe me, you can't live without that. | ||
// At least if you need Encoding.ycp which is included from somewhere. | ||
import "Testsuite"; | ||
|
||
map READ = $[ | ||
"probe" : $[ | ||
"architecture" : "i386", | ||
], | ||
]; | ||
|
||
map EXEC = $[ | ||
"target": $[ | ||
"bash_output": $[ | ||
"stdout": "", | ||
"stderr": "", | ||
"exit": 0 | ||
], | ||
], | ||
]; | ||
|
||
Testsuite::Init( [ READ, $[], EXEC ], nil); | ||
|
||
include "network/lan/hardware.ycp"; | ||
} |
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 @@ | ||
Read .target.tmpdir nil | ||
Log Failed to set temporary directory: nil | ||
Read .probe.architecture "i386" | ||
Read .sysconfig.console.CONSOLE_ENCODING nil | ||
Execute .target.bash_output "locale -k charmap" $["exit":0, "stderr":"", "stdout":""] |
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