mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-28 21:05:45 -05:00
[partition] Coding style on tests
This commit is contained in:
parent
b33e54abb9
commit
c7857b7749
1 changed files with 9 additions and 10 deletions
|
@ -26,19 +26,17 @@ QTEST_GUILESS_MAIN( ClearMountsJobTests )
|
|||
|
||||
|
||||
/* Not exactly public API */
|
||||
QStringList
|
||||
getPartitionsForDevice( const QString& deviceName );
|
||||
QStringList getPartitionsForDevice( const QString& deviceName );
|
||||
|
||||
QStringList
|
||||
getPartitionsForDevice_other(const QString& deviceName)
|
||||
getPartitionsForDevice_other( const QString& deviceName )
|
||||
{
|
||||
QProcess process;
|
||||
process.setProgram( "sh" );
|
||||
process.setArguments( {
|
||||
"-c",
|
||||
QString( "echo $(awk '{print $4}' /proc/partitions | sed -e '/name/d' -e '/^$/d' -e '/[1-9]/!d' | grep %1)" )
|
||||
.arg( deviceName )
|
||||
} );
|
||||
process.setArguments(
|
||||
{ "-c",
|
||||
QString( "echo $(awk '{print $4}' /proc/partitions | sed -e '/name/d' -e '/^$/d' -e '/[1-9]/!d' | grep %1)" )
|
||||
.arg( deviceName ) } );
|
||||
process.start();
|
||||
process.waitForFinished();
|
||||
|
||||
|
@ -55,10 +53,11 @@ getPartitionsForDevice_other(const QString& deviceName)
|
|||
|
||||
ClearMountsJobTests::ClearMountsJobTests()
|
||||
{
|
||||
Logger::setupLogLevel(6);
|
||||
Logger::setupLogLevel( Logger::LOGDEBUG );
|
||||
}
|
||||
|
||||
void ClearMountsJobTests::testFindPartitions()
|
||||
void
|
||||
ClearMountsJobTests::testFindPartitions()
|
||||
{
|
||||
QStringList partitions = getPartitionsForDevice( "sda" );
|
||||
QStringList other_part = getPartitionsForDevice_other( "sda" );
|
||||
|
|
Loading…
Add table
Reference in a new issue