How to perform CPU mining on bitcoin TESTNET on Linux? I need approximately 100 Bitcoin Testnet to run an experiment on the lightning network. 

Any suggestion on how to run CPU mining? Should I use cgminer?
Make any sense to perform solo mining on testnet?

Currently I am running a full testnet node with bitcoind on a linux environment.
It's almost impossible to mine Testnet BTC with CPU, but there is a generatetoaddress command in Bitcoin Core:

bitcoin-cli generatetoaddress nblocks "address" ( maxtries )


If you want to continuously mine on Linux, create a bash loop:

while [ 1 ]
do
    bitcoin-cli generatetoaddress 1 "2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp" 10000000
done




Documentation: https://bitcoin.org/en/developer-reference#generatetoaddress