Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only require BDD for running tests #5

Closed
workhorsy opened this issue Sep 5, 2017 · 2 comments
Closed

Only require BDD for running tests #5

workhorsy opened this issue Sep 5, 2017 · 2 comments

Comments

@workhorsy
Copy link
Owner

There should be a way to only require BDD to run the test suite. This way people can depend on lru_eviction_queue without pulling in BDD.

@workhorsy
Copy link
Owner Author

I can't get it to work yet. Maybe there is a way to use the configurations section to have a separate dependencies section. This is what I have so far.

{
	"name": "lru_eviction_queue",
	"description": "A LRU Eviction Queue for the D programming language",
	"authors": [
		"Matthew Brennan Jones <matthew.brennan.jones@gmail.com>",
	],
	"homepage": "https://github.com/workhorsy/BDD",
	"copyright": "Copyright (c) 2017 Matthew Brennan Jones",
	"license": "BSL-1.0",
	"importPaths": ["source/"],

	"configurations": [
		{
			"name": "default",
			"targetName": "lru_eviction_queue-lib",
			"versions": ["default"],
		},
		{
			"name": "test",
			"targetName": "lru_eviction_queue-test",
			"versions": ["test"],
			"dependencies": {
				"bdd": "~>1.3.0",
			},
		},
	],

	"targetPath": "lib",
	"targetType": "staticLibrary",
}

@workhorsy
Copy link
Owner Author

Got it to work. The trick was to name the test config "unittest".

{
	"name": "lru_eviction_queue",
	"description": "A LRU Eviction Queue for the D programming language",
	"authors": [
		"Matthew Brennan Jones <matthew.brennan.jones@gmail.com>",
	],
	"homepage": "https://github.com/workhorsy/BDD",
	"copyright": "Copyright (c) 2017 Matthew Brennan Jones",
	"license": "BSL-1.0",
	"importPaths": ["source/"],
	"targetPath": "lib",

	"configurations": [
		{
			"name": "default",
			"targetName": "lru_eviction_queue",
			"targetType": "staticLibrary",
			"dependencies": {
			},
		},
		{
			"name": "unittest",
			"targetName": "lru_eviction_queue-test",
			"targetType": "executable",
			"mainSourceFile": "test/main.d",
			"dependencies": {
				"bdd": "~>1.3.0",
			},
		},
	],
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant