[AIX] Re-apply: Remove unsupported AIX native echo option -n by using printf#199395
Open
Himadhith wants to merge 1 commit into
Open
[AIX] Re-apply: Remove unsupported AIX native echo option -n by using printf#199395Himadhith wants to merge 1 commit into
Himadhith wants to merge 1 commit into
Conversation
|
@llvm/pr-subscribers-testing-tools Author: Himadhith ChangesAIX native echo doesn't support the The current test fails as follows: Full diff: https://github.com/llvm/llvm-project/pull/199395.diff 1 Files Affected:
diff --git a/llvm/utils/lit/tests/unit/Util.py b/llvm/utils/lit/tests/unit/Util.py
index 794950f44ef19..112ea59b869f5 100644
--- a/llvm/utils/lit/tests/unit/Util.py
+++ b/llvm/utils/lit/tests/unit/Util.py
@@ -29,12 +29,12 @@ def _lit_config():
def test_basic(self):
lit_config = self._lit_config()
- self.assertEqual(lit_config.run_command_cached(["echo", "-n", "hi"]), b"hi")
+ self.assertEqual(lit_config.run_command_cached(["printf", "hi"]), b"hi")
self.assertNotEqual(lit_config.run_command_cached("ls"), None)
# Test that arguments (e.g. text=True) get forwarded to subprocess.run
self.assertEqual(
- lit_config.run_command_cached(["echo", "-n", "hi"], text=True), "hi"
+ lit_config.run_command_cached(["printf", "hi"], text=True), "hi"
)
# shell=True is not implied
|
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AIX native echo doesn't support the
-nflag.Use
printfinstead to ensure the test works across all systems and making it portable.The current test fails as follows: