Giter VIP home page Giter VIP logo

Comments (15)

ostroffjh avatar ostroffjh commented on May 28, 2024

(sorry if I'm crossing wires with email and issues and ....) Gentoo currently has no versions of nunit packaged, and I have had a singular lack of success building any version 2.6.x (and no source tarball for 2.6.4). Is it possible to make unit testing optional, and either not require nunit at all or accept 2.4.8 if no testing is to be done? (To me, that is different from using Release instead of Debug build. I may want a Debug version, even without unit testing.)

from f-spot.

NguyenMatthieu avatar NguyenMatthieu commented on May 28, 2024

That's one of the first things I noticed, actually. Upping the required version, configure script says "unit tests: No", but the build still trying to compile the unit tests. So my plan was:

  1. update the required version to 2.6.4 in the csproj.
  2. if version not found, even if --enable-tests is set to true, set unit tests:no during config
  3. Only build the unit tests if unit tests:yes after configure.
    Point 2 above is the current behaviour, btw.
    Note that I'm not sure of the difference between the Release and Debug configurations. If the only difference is "build the unit tests", I would be tempted to not create a third run configuration.

from f-spot.

jstedfast avatar jstedfast commented on May 28, 2024

I would recommend using the NuGet package of NUnit, it's trivial to setup (basically, just add the NuGet package and you're done).

from f-spot.

NguyenMatthieu avatar NguyenMatthieu commented on May 28, 2024

Side note: distros can't use NuGet for building their packages, though. They have to build from source. So even if I used NuGet, when I tell the mageia people "btw, you need to introduce the nunit package if you want to be able to package f-spot again", they'll turn to me as soon as they run into build problems. Might as well grab the bull by the horns and figure out building from source, in that case...

from f-spot.

decriptor avatar decriptor commented on May 28, 2024

@jstedfast I'd prefer that, but distros aren't nuget package friendly :(

PS. There is some work to make it so that you can do nuget packages on Linux. I'm not sure how it is supposed to work, but maybe something similar to how maven does things?

from f-spot.

ostroffjh avatar ostroffjh commented on May 28, 2024

Similar issue on Gentoo, which is source based, so it's package (ebuild) is just instructions on how to build from source. nunit apparently/supposedly uses nant, but nant is complaining it can't find a .build file. Either I'm missing a high level .build file, or I'm missing how to tell nant to find all the lower level build files in the source.

from f-spot.

decriptor avatar decriptor commented on May 28, 2024

@ostroffjh This is how openSUSE packages and builds nunit - https://build.opensuse.org/package/show/Mono:Factory/nunit

from f-spot.

ostroffjh avatar ostroffjh commented on May 28, 2024

They use xbuild instead of nant. That gets me much further, but I still get lots of "CSC: error CS2001: Source file `Constraints/AllItemsConstraintTests.cs' could not be found" All with "Constraints" but different .cs files. If I'm lucky, I'm just missing some dependency, but I have no idea what.

Ha! I just found a Google Groups posting including "You're right. Some changes in the script apparently dropped a bunch of files." and I have two different zip files for 2.6.3, with different number of cs files in .../src/NUnitFramework/tests/Constraints so I'll just try again with the other source. Now I'll also have to figure out where I got each of them and why one is missing files.....

from f-spot.

ostroffjh avatar ostroffjh commented on May 28, 2024

I'm still missing three files. Two (from NUnitCore/tests/) are present in the other 2.6.3 source or in the 2.6.4 source, but one (AssemblyInfo.cs from ConsoleRunner/nunit-console-exe/) I don't see anywhere. I no longer remember where I got this 2.6.4 source, but I'll give it a try.

from f-spot.

NguyenMatthieu avatar NguyenMatthieu commented on May 28, 2024

Could nunit/nunitv2#35 be a hint towards a solution to the missing files?

from f-spot.

NguyenMatthieu avatar NguyenMatthieu commented on May 28, 2024

@ostroffjh ok, made some progress on the "do not build unit tests if nunit is missing or if --enable-tests is not set". Turns out the difference between the "Release" and "Debug" configuration really appear to be just about "building the unit tests or not". So I am looking at implementing a logic that will build the "Release" configuration if Unit Tests: no, and "Debug" configuration if unit tests: yes.

from f-spot.

NguyenMatthieu avatar NguyenMatthieu commented on May 28, 2024

Trying to build nunit 2.6.4 now. Downloading this tarball: https://github.com/nunit/nunitv2/archive/2.6.4.zip
And running xbuild nunit.sln /t:Rebuild /p:Configuration=Debug as root it does compile, just a couple warnings, but no errors.

However, it only builds. There doesn't seem to be an "install" target. Meaning we'd have to manually do the install steps done by the OpenSUSE spec file sent out by @decriptor : https://build.opensuse.org/package/view_file/Mono:Factory/nunit/nunit.spec?expand=1

from f-spot.

ostroffjh avatar ostroffjh commented on May 28, 2024

I think that's the same source of nunit I'm trying to compile. At the moment, I'm having trouble getting the ebuild to use xbuild instead of ant, but I think I probably just have a typo somewhere. Also, if RELEASE vs. DEBUG really only differs on building the tests, then the Gentoo ebuild already picks the right one based on the local setting of a "debug" use flag. However, the ./configure also needs to match what the compile will expect.

For installing nunit, I believe it just requires copying everything under one directory (bin?) to the right place in the live file system. I think it's mentioned in the installing docs for nunit, but I'll have to check again.

from f-spot.

NguyenMatthieu avatar NguyenMatthieu commented on May 28, 2024

@ostroffjh Actually, installation does a bit more than that. There's the "create the .pc for pkg-config" aspect, also the DLLs are installed into the gac after being copied to $install_dir/lib/nunit, and then you have the nunit bin (shell script pointing to the actual exe) added to $install_dir/bin. If I read the .spec correctly.

Re:

However, the ./configure also needs to match what the compile will expect.

Totally agree. That's why my pull request actually changes the build profile depending on whether we enable the tests or not. So that if we do not say we want to run the tests, make doesn't try to compile them.

from f-spot.

ostroffjh avatar ostroffjh commented on May 28, 2024

@NguyenMatthieu (I've got a Gentoo ebuild working, but not complete yet.) Depending on which distro you look at as an example, you might need to create a bin file for nunit and nunit-console, as well as the .pc file. However, I thought there was a note somewhere about NOT installing this version in the gac due to API instability. Hopefully, my install can be reasonably tested by actually trying to do the f-spot tests as part of it's build.

from f-spot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.