]> granicus.if.org Git - yasm/commitdiff
Fix test failure due to build environment. 1/head
authorPeter Johnson <peter@tortall.net>
Mon, 21 Mar 2011 04:18:01 +0000 (21:18 -0700)
committerPeter Johnson <peter@tortall.net>
Mon, 21 Mar 2011 04:18:01 +0000 (21:18 -0700)
When YASM_TEST_SUITE environment is defined, force version to "yasm
HEAD" and all yasm__getcwd() calls to return "./".

libyasm/file.c
modules/dbgfmts/codeview/cv-symline.c
modules/dbgfmts/dwarf2/dwarf2-info.c
modules/dbgfmts/dwarf2/tests/gen64/dwarf64_pathname.hex

index 076093489cf901a19745933d1883c3d812420b05..6b0b5cc08c004e07e456ec30c32c9ebd24dbb27d 100644 (file)
@@ -243,6 +243,12 @@ yasm__getcwd(void)
 
     size = 1024;
     buf = yasm_xmalloc(size);
+
+    if (getenv("YASM_TEST_SUITE")) {
+        strcpy(buf, "./");
+        return buf;
+    }
+
     while (getcwd(buf, size-1) == NULL) {
         if (errno != ERANGE) {
             yasm__fatal(N_("could not determine current working directory"));
index 1996c33a69cfc6247d450dae36782368ff31171b..ca31271b955b7c7ba669acb9479b4f8caee772a8 100644 (file)
@@ -638,9 +638,12 @@ yasm_cv__generate_symline(yasm_object *object, yasm_linemap *linemap,
     /* add object and compile flag first */
     cv8_add_sym_objname(info.debug_symline,
                         yasm__abspath(object->obj_filename));
-    cv8_add_sym_compile(object, info.debug_symline,
-                        yasm__xstrdup(PACKAGE_NAME " " PACKAGE_INTVER "."
-                                      PACKAGE_BUILD));
+    if (getenv("YASM_TEST_SUITE"))
+        cv8_add_sym_compile(object, info.debug_symline,
+                            yasm__xstrdup("yasm HEAD"));
+    else
+        cv8_add_sym_compile(object, info.debug_symline,
+                            yasm__xstrdup(PACKAGE_STRING));
     /* then iterate through symbol table */
     yasm_symtab_traverse(object->symtab, &info, cv_generate_sym);
     cv8_set_symhead_end(head, yasm_section_bcs_last(info.debug_symline));
index dd48098b6ead3a54a7f33778c9f1aa0e2838e398..eebce33fbe611b98ea141772d4e6e8a459de8917 100644 (file)
@@ -337,7 +337,10 @@ yasm_dwarf2__generate_info(yasm_object *object, yasm_section *debug_line,
 
     /* producer - assembler name */
     abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_producer, DW_FORM_string);
-    dwarf2_append_str(debug_info, PACKAGE " " VERSION);
+    if (getenv("YASM_TEST_SUITE"))
+        dwarf2_append_str(debug_info, "yasm HEAD");
+    else
+        dwarf2_append_str(debug_info, PACKAGE_STRING);
 
     /* language - no standard code for assembler, use MIPS as a substitute */
     abc->len += dwarf2_add_abbrev_attr(abbrev, DW_AT_language, DW_FORM_data2);
index 379a050b3bc889c586e52e155572a0ec590ecd73..10ae2c38842d02268be46d9a444bba62fe6d8abd 100644 (file)
@@ -38,7 +38,7 @@
 00 
 00 
 00 
-a
+8
 03 
 00 
 00 
@@ -266,7 +266,7 @@ fb
 00 
 00 
 00 
-45 
+2d 
 00 
 00 
 00 
@@ -300,31 +300,7 @@ fb
 00 
 2d 
 00 
-2f 
-68 
-6f 
-6d 
-65 
-2f 
-70 
-65 
-74 
-65 
-72 
-2f 
-70 
-72 
-6f 
-6a 
-65 
-63 
-74 
-2f 
-79 
-61 
-73 
-6d 
-32 
+2e 
 2f 
 00 
 79 
@@ -438,14 +414,6 @@ fb
 00 
 00 
 00 
-00 
-00 
-00 
-00 
-00 
-00 
-00 
-00 
 2c 
 00 
 00 
@@ -1014,7 +982,7 @@ ff
 00 
 00 
 00 
-2
+0
 02 
 00 
 00 
@@ -1078,7 +1046,7 @@ ff
 00 
 00 
 00 
-a
+8
 02 
 00 
 00 
@@ -1142,7 +1110,7 @@ ac
 00 
 00 
 00 
-b
+9
 02 
 00 
 00 
@@ -1470,7 +1438,7 @@ f8
 00 
 00 
 00 
-49 
+31 
 00 
 00 
 00 
@@ -1526,7 +1494,7 @@ f8
 00 
 00 
 00 
-58 
+40 
 01 
 00 
 00 
@@ -1590,7 +1558,7 @@ f8
 00 
 00 
 00 
-c
+a
 01 
 00 
 00 
@@ -1654,7 +1622,7 @@ c0
 00 
 00 
 00 
-f
+d
 01 
 00 
 00