Modify

Ticket #1037 (closed enhancement: fixed)

Opened 12 years ago

Last modified 11 years ago

Run testsuite directly from checkout

Reported by: https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU Owned by: solj
Priority: minor Milestone: Bcfg2 1.3.0 Release
Component: bcfg2-server Version: 1.0
Keywords: Cc:

Description

Bcfg2 source layout doesn't allow to run testsuite directly from checkout. Even if you set PYTHONPATH=src/lib this won't work, because lib/ directly contains modules that should be available from Bcfg2 package in order to be found by import statements in Python scripts.

$ PYTHONPATH=src/lib nosetests -d testsuite
EEE
======================================================================
ERROR: Failure: ImportError (No module named Bcfg2.Client.Frame)
...
ImportError: No module named Bcfg2.Server.Core

----------------------------------------------------------------------
Ran 3 tests in 0.295s

The solution is to move Bcfg2 source to a subfolder named Bcfg2.

Attachments

Change History

comment:1 Changed 12 years ago by solj

  • Status changed from new to closed
  • Resolution set to invalid

comment:2 follow-up: ↓ 5 Changed 12 years ago by https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU

  • Status changed from closed to reopened
  • Resolution invalid deleted

I often work from a network disk using samba share that doesn't allow links to be created.

comment:3 Changed 12 years ago by https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU

I also don't understand why you want this extra step to be present.

comment:4 Changed 12 years ago by https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU

What advantages does it provide?

comment:5 in reply to: ↑ 2 ; follow-up: ↓ 6 Changed 12 years ago by solj

  • Milestone changed from Bcfg2 1.2.0 Release to Bcfg2 1.3.0 Release

Replying to https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU:

I often work from a network disk using samba share that doesn't allow links to be created.

You can probably just create a git hook in that case to copy the contents over to a Bcfg2 directory.

comment:6 in reply to: ↑ 5 Changed 12 years ago by https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU

Replying to solj:

Replying to https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU:

I often work from a network disk using samba share that doesn't allow links to be created.

You can probably just create a git hook in that case to copy the contents over to a Bcfg2 directory.

I doubt it copies the contents each time the code is modified, which means I need to hack on copy of the code, which means the hook should detect changes in copy and be able to merge between copy and modifications in the checkout. I really doubt there is an existing Git hook to support that and ISTM that it is an overkill to create one.

Bcfg2 source code misses top level package structure that is required by Python and I can't understand the reasons to keep it this way and require extra 'compilation' steps when they can be safely avoided.

comment:7 Changed 12 years ago by solj

  • Owner changed from desai to solj
  • Status changed from reopened to accepted
  • Milestone changed from Bcfg2 1.3.0 Release to Bcfg2 1.2.1 Release (Bugfix)

I think we can change this relatively easily by moving src/lib/* to src/lib/Bcfg2. Since this involves moving a few things around and changing things in setup.py, I think we will wait until after 1.2.0 is released to do it.

comment:8 Changed 11 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc

  • Milestone changed from Bcfg2 1.2.1 Release (Bugfix) to Bcfg2 1.3.0 Release

comment:9 Changed 11 years ago by solj

  • Priority changed from major to minor
  • Resolution set to fixed
  • Status changed from accepted to closed
  • Component changed from bcfg2-client to bcfg2-server
  • Type changed from defect to enhancement

Added this capability in dab1d03d81c538966d03fb9318a4588a9e803b44.

comment:10 Changed 11 years ago by https://www.google.com/accounts/o8/id?id=AItOawkPb0RtPyicSdU7pLcv1UrX-yCh-YjkOwU

Good to see this fixed.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.