Fix arm test list creator for Windows (#17852)
authorSergey Andreenko <seandree@microsoft.com>
Tue, 1 May 2018 23:05:32 +0000 (16:05 -0700)
committerGitHub <noreply@github.com>
Tue, 1 May 2018 23:05:32 +0000 (16:05 -0700)
* use "\n" for splitting lines

* update comment

tests/scripts/lst_creator.py

index dc9de02..2b35646 100755 (executable)
@@ -48,8 +48,9 @@ def create_list_file(file_name, metadata):
     Args:
         file_name (str): Location to write the lstFile
         metadata ({ str: { str: str } }): Dictionary mapping test name to
-                                        : a dictionary of key/value
-                                        : attributes.
+                                        : a tuple, the first tuple's value is
+                                        : a dictionary of key/value attributes,
+                                        : the second is test index.
 
     """
 
@@ -258,7 +259,7 @@ def parse_lst_file(lst_file):
             index = int(unique_name.split("_")[-1])
             metadata = defaultdict(lambda: None)
 
-            attributes = item.split(os.linesep)
+            attributes = item.split("\n")
             for attribute in attributes:
                 # Skip the removed new lines.
                 if len(attribute) == 0: