1. SCons
  2. Core
  3. SCons
  4. Pull requests

Pull requests

#5 Declined
Deleted repository
default (f314888b9bf8)

Incorrect Visual Studio project generation.

  1. Alexey Petruchik

When project contains only one .cpp or only one .h file, incorrect paths are generated. SConstuct file in attached zip [http://dl.dropbox.com/u/1777581/sconsbug.zip] generates two projects: project1 and project2. project1 contains only one cpp file: main.cpp. After opening generated project in Visual Studio and double clickin on main.cpp you will get error message. project2 is ok.

Comments (12)

    1. Gary Oberbrunner

      Hi -- we're still figuring out this bitbucket thing :-). A couple of things on this: your patch looks OK to me but we can't accept as is without a test to go with it (eventually a core dev will probably try to write a test so we can accept it, but if you can modify the existing test that will help hugely). The workflow we're trying to use is documented at http://www.scons.org/wiki/SconsMercurialWorkflows, and in there we're also encouraging pull requests on topic branches.

      There's some doc on writing tests at http://www.scons.org/wiki/DeveloperGuide/TestingMethodology but I think in your case you can just extend the existing msvs tests. Let me know if that works for you.

      1. Alexey Petruchik author

        Hi! I'm trying to setup build workflow. I'm running

        hg clone ssh://hg@bitbucket.org/scons/scons
        cd scons
        python bootstrap.py build/scons

        but I get an error

        Traceback (most recent call last):
          File "bin/scons-proc.py", line 108, in <module>
        TypeError: initial_value must be unicode or None, not str
        scons: *** [build/doc/man/builders.man] Error 1
        scons: building terminated because of errors.

        Am I doing everything right? Can this be somehow fixed? Any temporary workaround?

        1. Gary Oberbrunner

          Not sure; it works for me. Are you using cygwin python or real python? What version? I tried it with real python, v2.6.

          Looking at the code in bin/scons-proc.py, it looks like the lines just before the error you posted might be significant. I.e. which file is it processing?

              1. Gary Oberbrunner

                Yes -- Russel confirms it's broken with 2.7.

                You should be able to make progress anyway; you can run the tests without any installed SCons and without any build; just python runtest.py -a.

                1. Alexey Petruchik author

                  Could you please explain me about Visual Studio test? What command I should write to run tests? Cause I found "test/MSVS" folder and "src/engine/SCons/Tool/msvsTests.py". Which one is correct?

  1. Gary Oberbrunner

    Hi Alexey. The tests alongside the source files (e.g. src/engine/SCons/Tool/msvsTests.py) are unit tests; they test the detailed operation of the corresponding source file, usually by getting manipulating detailed state of the code under test; they don't do whole builds. The tests in test/ subfolders are system tests; they test black-box operation of the whole system usually by doing builds and seeing if the results (generated files, stdout/stderr) match expectations.

    In most cases the unit tests don't require the tool (MSVS) to be installed; they just test whether things are set up correctly so the tool *should* run fine when given correct input. But the system tests can't run without the tool since they actually run it.

  2. Alexey Petruchik author

    Hi, Gary. Finally I've made tests for this case. Sorry for a bit messy commit history because of TextMate project. Next time I will do separate feature branch according to a SconsMercurialWorkflow guideline. Or if you wish I can create a new "clean" pull request