Calgary police's anti-corruption unit got a two-for-one deal when text messages between one officer, under investigation for bribery, led investigators to suspect his partner was stealing marijuana.

Const. Robert Cumming was set up in a sting where he was given a backpack of marijuana by undercover officers and observed taking it home, according to a witness on Day 1 of his trial.

Cumming, 44, was arrested June 3, 2016, and charged with breach of trust, theft under $5,000 and possession of a controlled substance.

In November 2015, Det. Timothy Fitzgibbon was leading Operation Gumshoe, investigating Const. Bryan Morton and five others — mostly current, former and civilian CPS members — for corruption, harassment and breach of trust allegations.

During that investigation, Fitzgibbon picked up on suspicious text messages between Cumming and Morton, leading to a seven-month investigation dubbed Operation Smoke, during which police looked into all drug-related calls he attended between 2013 and 2015.

Robert Cumming is on trial on charges of breach of trust, theft under $5,000 and possession of a controlled substance. (Facebook)

Morton and the other five also face criminal charges, though they stem from Operation Gumshoe — three of them were in the courtroom on Tuesday.

Fitzgibbon testified that the idea was to set Cumming up by having an undercover officer hand him a backpack he'd found on the ground containing an ounce of marijuana and other items designed to "look like it belonged to a high school girl."

On June 3, 2016, after he received the backpack, Cumming drove to his home. Officers from a surveillance unit found an open backpack and marijuana in the garbage behind his home, according to Staff Sgt. Jeff MacQueen.

Cumming returned to work, finished his shift and then drove back home, said MacQueen, where he then took the drugs out of the garbage.

Cumming smelled like alcohol when arrested

During his arrest several hours later, Cumming smelled like alcohol and was slurring his words and said he was "f**ked" and that his "life was over," according to MacQueen.

Lethbridge Provincial Court Judge Jerry LeGrandeur is presiding over the judge-alone trial and Richard Tchir from Edmonton is prosecuting the case because of the conflict given Cumming is a police officer.

All of the Crown's evidence is being held in a voir dire — a hearing to determine if the evidence is admissible.

Cumming's lawyer Paul Brunnen is challenging the admissibility of the evidence gained from the search of Cumming's home.

Brunnen will also argue his client was entrapped — set up by fellow officers.

Several officers and former officers who are or have been charged with crimes showed up at court on Tuesday, including Gerard Brand, Bryan Morton, Steve Walton and Healther Walton.

Officers in court 'for support'

Brand, who had been accused of illegally accessing CPS computer system information and selling it to a private company, was acquitted of corruption charges in November.

Walton, his wife and Morton face corruption, harassment and breach of trust allegations in connection to a private investigation firm.

The officers are in the courtroom "for support," according to Walton.

Cumming is suspended from duty with pay pending the outcome of his trial.

An investigation by the professional standards section will begin once the criminal process is complete.

Tchir plans to call 12 witnesses.