Git Product home page Git Product logo

Comments (8)

ndmitchell avatar ndmitchell commented on August 22, 2024

There are ways to run the tests that don't need internet access. Unfortunately the cabal test support doesn't seem to be able to pass arguments to the executable, as far as I could tell? I guess I can add checking an environment variable to find out I am under a non-internet VM? Any suggestions?

from hoogle.

peti avatar peti commented on August 22, 2024

I believe that these options could be used to pass flags to the test executables during cabal test:

--test-options=TEMPLATES give extra options to test executables (name
                         templates can use $pkgid, $compiler, $os, $arch,
                         $test-suite)
--test-option=TEMPLATE   give extra option to test executables (no need to
                         quote options containing spaces, name template can
                         use $pkgid, $compiler, $os, $arch, $test-suite)

Alternatively, the test suite could be split into two (or more) executables, and then we run only those executables that don't need Internet access during cabal test. We've used that option with good success in the dns library.

from hoogle.

ndmitchell avatar ndmitchell commented on August 22, 2024

It seems like --test-option= is the best approach. Any suggestions on what is easy to integrate on your side?

Given that hoogle-test is really just a 3 line program that calls the real hoogle, and I'm somewhat bitter that I can't just declare my test suite to be hoogle test (e.g. the normal binary with a command line), I'd rather stay away from adding more test binaries.

from hoogle.

peti avatar peti commented on August 22, 2024

How about calling the test program with --no-net to disable net work access? I don't feel strongly about the name of tha flag, though. Any choice is fine.

from hoogle.

ndmitchell avatar ndmitchell commented on August 22, 2024

I'll add a --no-net flag. Given the spate of Hoogle releases to fix .cabal issues, and my plans for some real upcoming changes, I'll probably leave this a few weeks. Shout if you think it should be more important.

from hoogle.

ndmitchell avatar ndmitchell commented on August 22, 2024

I've added the feature with --no-net flag. I'll close the bug once it's released on Hackage.

from hoogle.

peti avatar peti commented on August 22, 2024

Thank you for your help!

from hoogle.

ndmitchell avatar ndmitchell commented on August 22, 2024

Fixed in 4.2.27 - let me know if you have any issues with it. I really appreciate the help, testing and notifications I get from the NixOS packagers (and all the packagers in general) - it helps ensure my packages are "right" in all the ways it's easy to forget when just releasing to Hackage.

from hoogle.

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.