Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Win 8.1 buildbot failing tests

From: Gerald Combs <gerald@xxxxxxxxxxxxx>
Date: Thu, 12 Mar 2015 08:56:37 -0700
On 3/12/15 8:33 AM, Graham Bloice wrote:
> On 12 March 2015 at 15:14, Graham Bloice <graham.bloice@xxxxxxxxxxxxx
> <mailto:graham.bloice@xxxxxxxxxxxxx>> wrote:
> 
> 
>     On 12 March 2015 at 15:01, Jeff Morriss <jeff.morriss.ws@xxxxxxxxx
>     <mailto:jeff.morriss.ws@xxxxxxxxx>> wrote:
> 
>         On 03/12/15 08:05, Graham Bloice wrote:
> 
>             The error seems to be running tests with a CMake out-of-tree
>             build, I
>             see the same issue locally.
> 
>              From the test output:
> 
>             global_config_path =
>             'C:\buildbot\wireshark\__wireshark-master-32\windows-8.__1-x86\build\cmbuild\run\__RelWithDebInfo\epan\wslua\'
> 
>             but the lua files (init.lua etc.) are in
>             C:\buildbot\wireshark\__wireshark-master-32\windows-8.__1-x86\build\cmbuild\run\__RelWithDebInfo\lua
> 
> 
>         Yes, wslua doesn't work/build well with cmake.  (As mentioned
>         recently) I fixed that with autotools (starting with
>         https://code.wireshark.org/__review/3348
>         <https://code.wireshark.org/review/3348>).  The commit message in
>         that change suggests what (I think) needs to be changed to make it
>         work with cmake--of course I left that for someone with the
>         apparently-necessary cmake book to do. :-)
> 
> 
>     On Windows, I think it's the layout that's wrong somewhere.  When
>     Wireshark is actually installed, the lua files are in a lua
>     subdirectory of the Wireshark directory, e.g. C:\Program
>     Files\Wireshark\lua.  C:\Program Files\Wireshark is the global
>     configuration directory and the lua files are one subdir down.
> 
>     CMake recreates the runtime environment in the appropriate "run"
>     directory, e.g. ...\run\relWithDebInfo, and that is the global config
>     directory for the build, but the tests (or something else) now expects
>     the lua files in globalconfig\epan\wslua (as reported by the test code).
> 
>     So for me the question is why do the tests (or the CMake built
>     executable) expect the lua files to be in the different place?
> 
> 
> 
> Oops, typed in haste, a Windows install puts the lua files in the main
> Wireshark directory.  This still doesn't answer my question as to why the
> tests have (for the 8.1. buildbot) the global config dir as:
> 
> global_config_path    = 'C:\buildbot\wireshark\wireshark-master-32\windows-8.1-x86\build\cmbuild\run\RelWithDebInfo\epan\wslua\'

That's because wslua appends epan/wslua to various paths if
running_in_build_directory() returns true. A proposed fix is at
https://code.wireshark.org/review/#/c/7590/, although it ended up touching
a lot of files.

We have another issue with tests and CMake: suite-unittests.sh always
builds the test executables using nmake on Windows.