Menu

#3698 Windows regression testing: uninstall step is bad

closed-fixed
None
other
5
2024-01-21
2024-01-18
No

Regression testing of windows snapshots is done by installing the SDCC on wine, then calling that SDCC. In some way this is nice, since we actually test that all the paths, etc are setup okay, so we test a bit more than we do on other OSes. But there also are some problems.

An older installed SDCC might interfere with testing, if it is in the path. To avoid that, there in an uninstall step just before the installation of the new snapshot in sdcc-build/components/sdcc.mk:

# uninstall the previous version
        -wine sdcc --version > /dev/null 2>&1 && wine 'c:/Program Files/SDCC/uninstall' /S && sleep 10
        # install sdcc package
        -wine $(SETUPNAME) /S && sleep 10

This has a hardcoded Program Files directory in it. On am64 Windows, that directory is for 64-Bit programs, while 32-Bit programs get installed to Program Files (x86), so this step will always uninstall the 64-bit version of SDCC if installed, while a 32-Bit version never gets uninstalled.

For regression testing to work correctly, we'd need to uninstall both 32-bit and 64-bit versions here (this might get more complicated on AR; Windows, where I think there might be any of 32-bit x86, 64-bit amd64, and aarch64 Windows binaries installed).

Also, it looks like the install / uninstall is done in the background, and instead of waiting for it to complete, we just wait 10s, assuming that is enough?

Related

Bugs: #3690

Discussion

  • Philipp Klaus Krause

    I wonder if something like the attached patch would be okay to fix this.

    Basically, it checks for SDCC in both Program Files and Program Files (x86) and uninstalls any we find.

     
    • Maarten Brock

      Maarten Brock - 2024-01-18

      This assumes that 32-bit testing and 64-bit testing are not done at the same time on the same machine, right? Is that a valid assumption?

       
      • Philipp Klaus Krause

        Yes, it does assume that. But I don't see how testing them at the same time would work: after it would require both installed and in the path, and we'd be back to the problem that we wouldn't know which version contributes to which results. So testing both at the same time was broken, and is still broken with the patch.

         
  • Philipp Klaus Krause

    • status: open --> closed-fixed
    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    Fixed in [r14633].

     

    Related

    Commit: [r14633]


Log in to post a comment.

MongoDB Logo MongoDB