CircleCI utility exiting 1 on tests split command

paralellism

#1

I am trying to test parallel command. but the utility is not working locally:

$ circleci tests glob versions/**/options | circleci tests split

the input device is not a TTY
$ circleci version                                              

circleci version: 0.0.3213-231902e
                                  Build Agent version: 0.0.3212-231902e
built: 2017-05-09T15:37:30+0000

After running the command the terminal newlines are all screwed up as well. Am I doing something wrong here or is this a known issue?


#2

Just try running the build with circleci build. When you run circleci, it runs a Docker image, so piping it isn’t doing exactly what you think.


#3

Hello, I got a same error.
Why?

My test repository is here.
https://circleci.com/gh/n0ts/practice-circleci/241

And “circleci tests glob “foo//*" "bar//*” | xargs -n 1 echo” is not working.
https://circleci.com/gh/n0ts/practice-circleci/261


#4

Try

TESTFILES=$(circleci tests glob "test/*-test.target" | circleci tests split --split-by=timings)
echo ${TESTFILES}

#5

I’m a bit confused by how the utility works. Do I need to pipe the output from tests split to the actual test command (like rspec/go test etc) or is that handled automatically by the circleci utility?

edit: nvm, I see that I have to xargs those tests into my test runner. Unfortunately that’s not obvious from the docs.


#6

Thanks for reply.

I got a error “the input device is not a TTY”

https://circleci.com/gh/n0ts/practice-circleci/263


#7

We opened up a bug ticket to address the local circleci tool not being able to test split like the utility within the 2.0 platform. You can’t use the local utility within your build- it’s a different thing. We inject the utility into your builds automatically.

Just to guarantee we’re on the same page, this is what’s breaking your build:

curl -o /usr/local/bin/circleci https://circle-downloads.s3.amazonaws.com/releases/build_agent_wrapper/circleci     && chmod +x /usr/local/bin/circleci

#8

Thanks for reply.

I got a same error in my test repositry.
https://circleci.com/gh/n0ts/practice-circleci/368

I’m waiting for fix this bug.

Thanks.


#9

That’s not a bug, don’t curl that tool. Don’t install it.


#10

Thanks for reply.

How to use circleci command in my custom image?


#11

We inject it into your build- you don’t need to do anything. Just use circleci in your config and it will work.


#12

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.