Bug 6415

Summary: testFile(frysk.proc.dead.TestInterpreter)junit.framework.ComparisonFailure: args (String[0]) expected:<......> but was:<...ba...>
Product: frysk Reporter: Mark Wielaard <mark>
Component: generalAssignee: Andrew Cagney <cagney>
Status: RESOLVED FIXED    
Severity: normal CC: cagney
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 2234    

Description Mark Wielaard 2008-04-16 08:55:25 UTC
Fails on both x86 and x86_64 (fedora 8):

$ ./TestRunner frysk.proc.dead.TestInterpreter
Running testFileScript(frysk.proc.dead.TestInterpreter) ...PASS
Running testFileArgScript(frysk.proc.dead.TestInterpreter) ...PASS
Running testFileScriptParam(frysk.proc.dead.TestInterpreter) ...PASS
Running testFileArgScriptParam(frysk.proc.dead.TestInterpreter) ...PASS
Running testSpaces(frysk.proc.dead.TestInterpreter) ...PASS
Running testFile(frysk.proc.dead.TestInterpreter) ...FAIL
  junit.framework.ComparisonFailure: args (String[0]) expected:<......> but
was:<...ba...>

Time: 0.026
There was 1 failure:
1) testFile(frysk.proc.dead.TestInterpreter)junit.framework.ComparisonFailure:
args (String[0]) expected:<......> but was:<...ba...>
   at frysk.junit.TestCase.assertEquals(TestRunner)
   at frysk.proc.dead.TestInterpreter.testFile(TestRunner)
   at frysk.junit.Runner.runCases(TestRunner)
   at frysk.junit.Runner.runTestCases(TestRunner)
   at TestRunner.main(TestRunner)

FAILURES!!!
Tests run: 6,  Failures: 1,  Errors: 0

Failed after run #0
Comment 1 Mark Wielaard 2008-04-16 10:13:55 UTC
The problem is that something in the build magic changed.
Previously the (build) script that was tested (fdebugrpm.sh) had:

#! /bin/sh
# Generated from: ../../frysk/frysk-core/frysk/bindir/fdebugrpm.sh
#!/bin/bash
[... rest of original fdebugrpm.sh from source tree ...]

Currently it doesn't have that anymore, it is just the script as in the source
tree (so starting with /bin/bash). Which is what the test is picking up.

This must mean that something changed so that the Makefile.rules for .sh files
doesn't trigger anymore for this script.
Comment 2 Andrew Cagney 2008-04-16 17:45:04 UTC
commit 09aea1d0cc8533a671774fba910304ee4001b767
Author: Andrew Cagney <cagney@redhat.com>
Date:   Wed Apr 16 13:42:54 2008 -0400

    Use the input file name to determine a SUBST output file type.
    
    frysk-common/ChangeLog
    2008-04-16  Andrew Cagney  <cagney@redhat.com>
    
        * Makefile.rules (SUBST): Match -in input file name, not output
        file name when selecting action.